Add translations
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
2
3 * configure.in (ALL_LINGUAS): Add "fr".
4 * configure: Regenerate.
5 * po/fr.po: New file.
6
7 * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
8
9 2001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
10
11 * som.c (setup_sections): Initialize subspace_sections.
12
13 2001-11-02 H.J. Lu (hjl@gnu.org)
14
15 * coffgen.c (coff_object_p): Return 0 if the header is too big.
16
17 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
18
19 * elfcore.h (elf_core_file_p): Preserve and clear abfd section
20 information. Save bfd arch and mach values. Restore on error.
21
22 2001-11-02 Alan Modra <amodra@bigpond.net.au>
23
24 * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
25 (allocate_PIC_calls): New function.
26 (allocate_dynrelocs): Don't allocate pic_call plt entries here.
27 (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
28 (elf32_hppa_finish_dynamic_symbol): Remove dead code.
29
30 2001-11-02 Hans-Peter Nilsson <hp@axis.com>
31
32 * elf32-cris.c (cris_elf_grok_prstatus): New function.
33 (cris_elf_grok_psinfo): New function.
34 (elf_backend_grok_prstatus): Define.
35 (elf_backend_grok_psinfo): Define.
36
37 2001-11-01 Alan Modra <amodra@bigpond.net.au>
38
39 * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
40 prediction bits.
41
42 2001-10-31 Chris Demetriou <cgd@demetriou.com>
43
44 * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
45 relocations properly.
46
47 2001-10-31 H.J. Lu <hjl@gnu.org>
48
49 * elflink.h (elf_link_output_extsym): Don't clear the visibility
50 field for relocateable.
51
52 2001-11-01 Alan Modra <amodra@bigpond.net.au>
53
54 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
55 .plt relocs in DT_RELASZ.
56
57 2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
58
59 * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
60 targets.
61
62 2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
63
64 * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
65
66 2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
67
68 * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
69 (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
70 (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
71 Regenerate dependencies.
72 * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
73 * config.bfd: [BFD64] (mmix-*-*): New case.
74 * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
75 * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
76 (bfd_mmix_arch): Declare.
77 (bfd_archures_list): Add bfd_mmix_arch.
78 * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
79 (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
80 (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
81 bfd_mmo_mmix_vec.
82 * reloc.c: Add MMIX relocations.
83 * bfd.c (struct _bfd, tdata): Add mmo_data.
84 * Makefile.in: Regenerate.
85 * configure: Regenerate.
86 * libbfd.h: Regenerate.
87 * bfd-in2.h: Regenerate.
88 * configure: Rebuild.
89
90 2001-10-30 Richard Earnshaw (rearnsha@arm.com)
91
92 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
93 p_paddr of the segment that contains it.
94 (copy_private_bfd_data): If the LMA for a segment is known, use it
95 for matching sections to segments.
96 (assign_file_positions_for_segments): Use the LMA when adjusting
97 for inter-section alignment padding.
98
99 2001-10-29 Kazu Hirata <kazu@hxi.com>
100
101 * README: Fix a typo.
102
103 2001-10-24 Richard Henderson <rth@redhat.com>
104
105 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
106 timestamp to time_t for ctime.
107
108 2001-10-24 Hans-Peter Nilsson <hp@axis.com>
109
110 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
111 unsigned, increasing index.
112
113 2001-10-23 H.J. Lu <hjl@gnu.org>
114
115 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
116 m != NULL before accessing it.
117
118 2001-10-23 Alan Modra <amodra@bigpond.net.au>
119
120 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
121 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
122 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
123
124 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
125 (hppa_link_hash_newfunc): Likewise.
126 (elf32_hppa_finish_dynamic_symbol): Likewise.
127 (allocate_dynrelocs): Always allocate .got relocs if shared.
128 (elf32_hppa_relocate_section): Output them too. Similarly
129 consolidate .plt reloc code, and no longer initialise .plt
130 when a reloc is output.
131 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
132 when no reloc is output.
133
134 From Herbert Xu <herbert@gondor.apana.org.au>
135 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
136 unreachable branches.
137
138 2001-10-22 H.J. Lu <hjl@gnu.org>
139
140 * configure.in (WIN32LIBADD): Use -L../libiberty for
141 mips*-*-linux*.
142 * configure: Rebuild.
143
144 2001-10-21 H.J. Lu <hjl@gnu.org>
145
146 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
147 if shared library is enabled only for Linux hosts.
148 * configure: Rebuild.
149
150 2001-10-21 H.J. Lu <hjl@gnu.org>
151
152 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
153 ../libiberty/Makefile instead of $enable_shared.
154 * configure: Rebuild.
155
156 2001-10-21 H.J. Lu <hjl@gnu.org>
157
158 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
159 index 0.
160
161 2001-10-20 H.J. Lu <hjl@gnu.org>
162
163 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
164 if shared library is enabled.
165 * configure: Rebuild.
166
167 2001-10-20 H.J. Lu <hjl@gnu.org>
168
169 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
170
171 2001-10-19 H.J. Lu <hjl@gnu.org>
172
173 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
174 size is empty.
175
176 2001-10-18 H.J. Lu <hjl@gnu.org>
177
178 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
179 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
180
181 2001-10-18 Jakub Jelinek <jakub@redhat.com>
182
183 * section.c (_bfd_strip_section_from_output): Don't count
184 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
185
186 2001-10-17 Alan Modra <amodra@bigpond.net.au>
187
188 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
189 Elf_Internal_Shdr.contents now that it's no longer a PTR.
190 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
191 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
192 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
193 * elf32-sh.c (sh_elf_relax_section): Likewise.
194 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
195 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
196 * elf.c (setup_group): Warning fixes.
197 * elflink.h (elf_link_sort_relocs): Likewise.
198 * pdp11.c (slurp_reloc_table): Likewise.
199
200 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
201
202 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
203 casts.
204
205 2001-10-15 H.J. Lu <hjl@gnu.org>
206
207 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
208 for relocations against discarded link-once section.
209
210 2001-10-15 Alan Modra <amodra@bigpond.net.au>
211
212 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
213 bfd_reloc_outofrange and similar errors.
214
215 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
216 rather than ind->weakdef.
217 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
218 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
219 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
220 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
221 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
222
223 2001-10-15 Alan Modra <amodra@bigpond.net.au>
224 H.J. Lu <hjl@gnu.org>
225
226 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
227 counts for aliases instead of aborting.
228 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
229 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
230
231 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
232 to -1 for non-function symbols.
233 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
234 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
235 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
236 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
237 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
238 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
239 plt.offset instead of plt.refcount when setting to -1.
240
241 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
242
243 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
244 like R_ARM_PC24. Include reloc number in error message about
245 unresolvable relocs.
246
247 2001-10-10 Jakub Jelinek <jakub@redhat.com>
248
249 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
250 relocations against the same symbol in .rel{,a}.dyn section.
251
252 2001-10-10 Kazu Hirata <kazu@hxi.com>
253
254 * aout-encap.c: Fix comment typos.
255 * aoutx.h: Likewise.
256 * archive.c: Likewise.
257 * bout.c: Likewise.
258 * coff64-rs6000.c: Likewise.
259 * coffcode.h: Likewise.
260 * coffgen.c: Likewise.
261 * cofflink.c: Likewise.
262 * coff-mips.c: Likewise.
263 * ecoff.c: Likewise.
264 * elf32-m32r.c: Likewise.
265 * libcoff-in.h: Likewise.
266 * libecoff.h: Likewise.
267 * libxcoff.h: Likewise.
268 * nlm32-i386.c: Likewise.
269 * pdp11.c: Likewise.
270 * section.c: Likewise.
271 * som.c: Likewise.
272 * som.h: Likewise.
273 * bfd-in2.h: Regenerate.
274 * libcoff.h: Likewise.
275
276 2001-10-10 Alan Modra <amodra@bigpond.net.au>
277
278 * elf.c (elf_map_symbols): Don't create new section symbols; Use
279 existing section syms. Update comments.
280 (copy_private_bfd_data): Formatting fixes.
281 (elfcore_grok_win32pstatus): Likewise.
282 (swap_out_syms): Likewise. Remove unnecessary level of braces.
283
284 2001-10-09 Alan Modra <amodra@bigpond.net.au>
285
286 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
287 "group_name".
288 (elf_group_name): Define.
289 (elf_next_in_group): Define.
290 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
291 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
292 first member section; Instead use elf_next_in_group.
293 (bfd_section_from_shdr): Likewise.
294 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
295
296 2001-10-09 Alan Modra <amodra@bigpond.net.au>
297
298 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
299 "next_in_group". Fix gp and gp_size comments.
300 * elf.c (union elf_internal_group): New.
301 (setup_group): New function.
302 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
303 Call setup_group for SHF_GROUP sections.
304 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
305 (elf_fake_sections): Set header type for SEC_GROUP, and header
306 flags for sections in a group.
307 (set_group_contents): New function.
308 (_bfd_elf_compute_section_file_positions): Call it.
309 (assign_section_numbers): Set sh_link for SHT_GROUP.
310
311 * elflink.h (gc_mark_hook): Handle section groups.
312 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
313 * section.c (SEC_GROUP): Define.
314 (struct sec): Comment fixes.
315 * bfd-in2.h: Regenerate.
316
317 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
318 out of function args.
319 (_bfd_elf_canonicalize_reloc): Similarly.
320 (_bfd_elf_get_symtab): Here too.
321 (_bfd_elf_canonicalize_dynamic_symtab): And here.
322 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
323 bfd_bread, and remove unnecessary cast.
324
325 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
326
327 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
328
329 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
330
331 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
332 compilation unit.
333
334 2001-10-06 Alan Modra <amodra@bigpond.net.au>
335
336 * bfd.c (bfd_assert): Report bfd version.
337 (_bfd_abort): Likewise.
338
339 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
340 section sym values. Instead replace any relocs against them with
341 relocs against STN_UNDEF, which has a zero value.
342
343 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
344 relocs.
345
346 2001-10-05 Jeff Law <law@redhat.com>
347
348 * som.h (som_exec_data): New field "version_id".
349 * som.c (som_object_setup): Record the version_id if it
350 exists.
351 (som_prep_headers): Do not initialize version_id here.
352 (som_finish_writing): Initialize version_id here.
353
354 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
355
356 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
357 according to the MIPS/SGI ELF64 ABI Draft.
358 (mips_elf_sort_hash_table): Typo.
359
360 2001-10-04 Alan Modra <amodra@bigpond.net.au>
361
362 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
363
364 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
365 copying flags if this is a weakdef.
366
367 2001-10-04 Alan Modra <amodra@bigpond.net.au>
368
369 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
370 packing.
371
372 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
373 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
374 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
375
376 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
377 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
378 backends we configure. Run "make dep-am".
379 (install-data-local): Install symcat.h.
380 * dep-in.sed: Remove symcat.h from dependencies.
381 * Makefile.in: Regenerate.
382
383 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
384
385 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
386
387 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
388
389 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
390 (elf_backend_default_use_rela_p): New define.
391
392 2001-10-03 Alan Modra <amodra@bigpond.net.au>
393
394 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
395 change.
396
397 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
398 * configure: Regenerate.
399 * Makefile.am (BFD_H_FILES): Add version.h.
400 * Makefile.in: Regenerate.
401 * po/SRC-POTFILES.in: Regenerate.
402
403 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
404 elf_backend_copy_indirect_symbol so that backend has a chance to
405 copy other necessary fields.
406 * elf-bfd.h (struct elf_backend_data): Update description of
407 elf_backend_copy_indirect_symbol.
408 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
409 copying flags if this is a weakdef.
410 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
411 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
412 than bfd_link_hash_lookup.
413 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
414 reloc processing for weakdefs.
415 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
416 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
417
418 2001-10-02 Alan Modra <amodra@bigpond.net.au>
419
420 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
421 result of ELF64_R_TYPE to enum before using in a switch.
422 (ppc64_elf_gc_mark_hook): Likewise.
423 (ppc64_elf_gc_sweep_hook): Likewise.
424 (ppc64_elf_reloc_type_class): Likewise.
425
426 2001-10-02 Alan Modra <amodra@bigpond.net.au>
427
428 * version.h: New file.
429 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
430 (BFD_VERSION_DATE): Define.
431 (BFD_VERSION_STRING): Define.
432 * configure.in: AC_SUBST bfd_version, bfd_version_date and
433 bfd_version_string.
434 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
435 * bfd-in2.h: Regenerate.
436 * configure: Regenerate.
437 * Makefile.am: Run "make dep-am".
438 * Makefile.in: Regenerate.
439
440 * bfd-in.h: Include "symcat.h".
441 (CONCAT4): Redefine as for old CAT4.
442 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
443 Add warning regarding whitespace.
444 * aout-cris.c: Likewise.
445 * aout-ns32k.c: Likewise.
446 * aout-sparcle.c: Likewise.
447 * aout-tic30.c: Likewise.
448 * aout0.c: Likewise.
449 * armnetbsd.c: Likewise.
450 * demo64.c: Likewise.
451 * elf-bfd.h: Likewise.
452 * gen-aout.c: Likewise.
453 * host-aout.c: Likewise.
454 * hp300bsd.c: Likewise.
455 * hp300hpux.c: Likewise.
456 * i386aout.c: Likewise.
457 * i386bsd.c: Likewise.
458 * i386dynix.c: Likewise.
459 * i386freebsd.c: Likewise.
460 * i386linux.c: Likewise.
461 * i386lynx.c: Likewise.
462 * i386mach3.c: Likewise.
463 * i386netbsd.c: Likewise.
464 * libaout.h: Likewise.
465 * m68k4knetbsd.c: Likewise.
466 * m68klinux.c: Likewise.
467 * m68klynx.c: Likewise.
468 * m68knetbsd.c: Likewise.
469 * m88kmach3.c: Likewise.
470 * mipsbsd.c: Likewise.
471 * newsos3.c: Likewise.
472 * ns32knetbsd.c: Likewise.
473 * pc532-mach.c: Likewise.
474 * pdp11.c: Likewise.
475 * riscix.c: Likewise.
476 * sparclinux.c: Likewise.
477 * sparclynx.c: Likewise.
478 * sparcnetbsd.c: Likewise.
479 * sunos.c: Likewise.
480 * targets.c: Likewise.
481 * vaxnetbsd.c: Likewise.
482 * vms-hdr.c: Likewise.
483
484 2001-10-01 Alan Modra <amodra@bigpond.net.au>
485
486 * bfd-in.h: Remove comments regarding generated files.
487 * libbfd-in.h: Likewise.
488 * libcoff-in.h: Likewise.
489 * bfd-in2.h: Regenerate.
490 * libbfd.h: Likewise.
491 * libcoff.h: Likewise.
492
493 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
494 Hans-Peter Nilsson <hp@bitrange.com>
495
496 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
497 partial_inplace, matching assembler output. Set src_mask to
498 all ones.
499 (sh_elf_relocate_section): Delete misplaced comment.
500 For relocatable linking against section symbol, call
501 _bfd_relocate_contents for partial_inplace relocs and adjust
502 rel->r_addend for others.
503 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
504 bfd_get_32, not at rel->r_addend.
505
506 2001-09-30 Alan Modra <amodra@bigpond.net.au>
507
508 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
509 the old dir refcount, so we indirectly set them to init_refcount.
510 Short-circuit asserts when we've just verified they are true.
511
512 2001-09-29 Alan Modra <amodra@bigpond.net.au>
513
514 * section.c (struct sec): Remove kept_section.
515 (STD_SECTION): Remove kept_section initialisation.
516 (bfd_make_section_anyway): Here too.
517 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
518 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
519 * elflink.h (elf_link_input_bfd): Set discarded link-once section
520 symbols to zero, and remove all code involved with kept_section
521 and tracking section symbol values.
522 * bfd-in2.h: Regenerate.
523 * configure.in: Bump version number.
524 * configure: Regenerate.
525
526 2001-09-29 Alan Modra <amodra@bigpond.net.au>
527
528 * elf64-ppc.c (struct ppc_dyn_relocs): New.
529 (IS_ABSOLUTE_RELOC): Define.
530 (struct ppc_link_hash_entry): New.
531 (struct ppc_link_hash_table): New.
532 (ppc_hash_table): Define.
533 (link_hash_newfunc): New function.
534 (ppc64_elf_link_hash_table_create): New function.
535 (create_got_section): New function.
536 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
537 pointers to our dynamic sections in hash table.
538 (ppc64_elf_copy_indirect_symbol): New function.
539 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
540 dynamic sections. Localise vars. Modify code for refcounts
541 starting from zero. Don't allocate here, or force symbols dynamic.
542 Don't copy all relocs if shared, select ones we need. Add code
543 to track possible copy relocs for non-shared link.
544 (ppc64_elf_gc_mark_hook): Update comment.
545 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
546 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
547 code for reference counting garbage collection. Don't create .plt
548 entries for functions that don't comply with ABI naming convention,
549 and don't allocate .plt space here. Use short-cuts to dynamic
550 sections. If possible, keep dynamic relocations instead of using
551 copy relocs. Remove confused comments.
552 (ppc_adjust_dynindx): Delete.
553 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
554 (allocate_dynrelocs): New function.
555 (readonly_dynrelocs): New function.
556 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
557 space here, and call allocate_dynrelocs to allocate space for
558 global .plt, .got and reloc sections. Use short-cuts to dynamic
559 sections. Call readonly_dynrelocs to determine whether we need
560 DT_TEXTREL. Don't generate section symbols here, the generic
561 ELF linker code does it for us.
562 (ppc64_elf_final_link): Call regular ELF backend linker rather than
563 gc variety, since we do our own .got handling.
564 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
565 dynamic section short-cuts. Localise vars, and delay setting.
566 Handle unknown relocs in main switch statement. Replace ugly
567 complicated tests for unresolvable relocs with a simple direct
568 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
569 before allowing an undefined sym in a shared lib. Do R_*_DS tests
570 after main switch, when we've set addend. Do non-addend insn
571 tweaks before main swithc. Ignore input_section->vma when
572 calculating reloc offsets as it's always zero. Rewrite dynamic
573 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
574 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
575 of dynamic section short-cuts. Reorganise .plt handling code.
576 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
577 Move expressions out of swap_reloca_out function calls.
578 (ppc64_elf_reloc_type_class): New function.
579 (ppc64_elf_info_to_howto): Move common expression to local var.
580 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
581 of dynamic section short-cuts. Don't fiddle with section syms
582 here as the ELF linker does it for us.
583 (elf_backend_can_refcount): Define.
584 (bfd_elf64_bfd_link_hash_table_create): Define.
585 (elf_backend_copy_indirect_symbol): Define.
586 (elf_backend_reloc_type_class): Define.
587 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
588
589 2001-09-29 Alan Modra <amodra@bigpond.net.au>
590
591 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
592 (struct elf_backend_data): Add can_refcount.
593 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
594 got.refcount and plt.refcount from init_refcount.
595 (_bfd_elf_link_hash_table_init): Set up init_refcount.
596 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
597 rather than got/plt.offset, and test for <= 0 rather than -1.
598 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
599 * elfxx-target.h (elf_backend_can_refcount): Define.
600 (elfNN_bed): Init can_refcount.
601 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
602 (_bfd_generic_link_hash_newfunc): Likewise.
603 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
604 starting from zero.
605 (elf_backend_can_refcount): Define.
606 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
607 starting from zero.
608 (elf32_hppa_copy_indirect_symbol): Make static to agree with
609 prototype.
610 (elf_backend_can_refcount): Define.
611 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
612 starting from zero.
613 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
614 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
615 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
616 (elf_backend_can_refcount): Define.
617 (elf_i386_copy_indirect_symbol): Make static to agree with
618 prototype. Formatting fix.
619 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
620 starting from zero.
621 (elf_backend_can_refcount): Define.
622 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
623 starting from zero.
624 (elf_backend_can_refcount): Define.
625 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
626 starting from zero.
627 (elf_backend_can_refcount): Define.
628 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
629 starting from zero.
630 (elf_backend_can_refcount): Define.
631 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
632 starting from zero.
633 (elf_backend_can_refcount): Define.
634
635 * som.c (som_write_symbol_strings): Cast current_offset in
636 bfd_seek call to match param type.
637
638 2001-09-28 J. Brobecker <brobecker@gnat.com>
639
640 * som.c (som_write_symbol_strings): Fix incorrect type of
641 current_offset to match the function definition. Fixes a build
642 failure on HPUX-11.00.
643
644 2001-09-28 Richard Henderson <rth@redhat.com>
645
646 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
647 SEC_MERGE, SEC_STRINGS.
648
649 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
650 * bfd-in2.h: Rebuild.
651
652 2001-09-28 Alan Modra <amodra@bigpond.net.au>
653
654 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
655 reloc code using x86_64_reloc_map.
656
657 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
658 no longer allocate here. Localise some vars to blocks where they
659 are used.
660 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
661 setting of vars until needed.
662 (allocate_dynrelocs): Don't create a .plt entry without a reloc
663 when symbol visibilty makes a function local.
664 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
665 swap_reloca_out function calls.
666 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
667 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
668 switch statement.
669
670 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
671 no longer allocate here. Localise some vars to blocks where they
672 are used. Remove separate switch stmt for creating .got sec.
673 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
674 redundant casts and aborts. Delay setting of vars until needed.
675 (allocate_dynrelocs): Remove redundant casts and aborts.
676 (elf_i386_size_dynamic_sections): Move comment.
677 (elf_i386_finish_dynamic_symbol): Move expressions out of function
678 calls.
679 (elf_i386_relocate_section): Likewise. Comment typo fix.
680 (elf_i386_finish_dynamic_sections): Migrate common code out of
681 switch statement.
682 (elf_backend_* defines): Sort.
683
684 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
685 without a reloc when symbol visibilty makes a function local.
686
687 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
688
689 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
690 conflicting float flags.
691
692 2001-09-26 Alan Modra <amodra@bigpond.net.au>
693
694 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
695 (elf_backend_copy_indirect_symbol): Define.
696 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
697 (struct elf_i386_link_hash_table): Likewise.
698 (link_hash_newfunc): Get rid of unnecessary casts.
699 (elf_i386_link_hash_table_create): Likewise.
700 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
701 Don't test input section SEC_READONLY here to try to avoid copy
702 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
703 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
704 here to properly test whether we need copy relocs. Do so for weak
705 syms too.
706
707 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
708 (elf_backend_copy_indirect_symbol): Define.
709 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
710 (stub_hash_newfunc): Get rid of unnecessary casts.
711 (hppa_link_hash_newfunc): Likewise.
712 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
713 Don't test input section SEC_READONLY here to try to avoid copy
714 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
715 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
716 here to properly test whether we need copy relocs. Do so for weak
717 syms too.
718
719 2001-09-26 Alan Modra <amodra@bigpond.net.au>
720
721 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
722 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
723 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
724
725 2001-09-25 Jakub Jelinek <jakub@redhat.com>
726
727 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
728 computation.
729
730 2001-09-25 H.J. Lu <hjl@gnu.org>
731
732 * bfd-in2.h: Regenerated.
733
734 2001-09-25 Alan Modra <amodra@bigpond.net.au>
735
736 * elf32-i386.c: Add comment re linker function names and ordering.
737 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
738 (elf_i386_grok_prstatus): Move before linker functions.
739 (elf_i386_grok_psinfo): Likewise.
740 (elf_i386_fake_sections): Move so that functions are ordered.
741 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
742
743 2001-09-25 Alan Modra <amodra@bigpond.net.au>
744
745 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
746 throughout file.
747
748 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
749 code handling this option.
750 (LONG_BRANCH_VIA_PLT): Likewise.
751 (RELATIVE_DYNRELOCS): Define as zero.
752 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
753 "pc_count" fields. Remove "section" field.
754 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
755 (elf32_hppa_check_relocs): Don't allocate space for dynamic
756 relocs here. Instead, record all needed dynamic relocs via
757 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
758 in elf_section_data.
759 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
760 (allocate_plt_and_got_and_discard_relocs): Rename to
761 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
762 (readonly_dynrelocs): New function.
763 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
764 Call readonly_dynrelocs to determine need for DT_TEXTREL.
765 Rename "i" to "ibfd". Allocate space for local dyn relocs.
766 (elf32_hppa_relocate_section): Make use of cached sreloc.
767 (elf32_hppa_reloc_type_class): New function.
768 (elf_backend_reloc_type_class): Define.
769
770 2001-09-25 Alan Modra <amodra@bigpond.net.au>
771
772 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
773 and "sreloc" fields.
774 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
775 "pc_count" fields. Remove "section" field.
776 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
777 allocate space for dynamic relocs here. Instead, record all
778 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
779 pointer to "sreloc" section in elf_section_data.
780 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
781 (allocate_plt_and_got_and_discard_relocs): Rename to
782 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
783 (readonly_dynrelocs): New function.
784 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
785 Rename "i" to "ibfd". Allocate space for local dyn relocs.
786 (elf_i386_relocate_section): Make use of cached sreloc.
787
788 2001-09-24 Alan Modra <amodra@bigpond.net.au>
789
790 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
791 reloc rather than just the type.
792 (_bfd_elf_reloc_type_class): Likewise.
793 * elf.c (_bfd_elf_reloc_type_class): Likewise.
794 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
795 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
796 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
797 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
798 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
799 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
800 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
801 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
802 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
803 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
804 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
805 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
806 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
807 * elflink.h: Formatting fixes.
808 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
809 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
810 o->contents to PTR. Update call to elf_backend_reloc_type_class.
811
812 2001-09-22 John Reiser <jreiser@BitWagon.com>
813
814 * elfcode.h (elf_object_p): Allow for no section header at all in
815 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
816
817 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
818
819 * elfxx-ia64.c: Fix compile time warning messages.
820 * coff-mcore.c: Fix compile time warning messages.
821 * coff-ppc.c: Fix compile time warning messages.
822 * coffcode.h: Fix compile time warning messages.
823 * elf32-mips.c: Fix compile time warning messages.
824 * elf64-alpha.c: Fix compile time warning messages.
825 * libbfd.c: Fix compile time warning messages.
826 * bfd-in2.h: Regenerate.
827
828 2001-09-21 Alan Modra <amodra@bigpond.net.au>
829
830 * Makefile.am: Run "make dep-am".
831 * Makefile.in: Regenerate.
832
833 * aoutx.h: Formatting fixes.
834 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
835
836 * linker.c: Replace bfd_get_filename with bfd_archive_filename
837 in error message.
838
839 2001-09-21 Alan Modra <amodra@bigpond.net.au>
840
841 * bfd.c (bfd_archive_filename): New function.
842 * bfd-in2.h: Regenerate.
843 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
844 in error messages where the bfd is an input bfd.
845 * aout-cris.c: Likewise.
846 * coff-arm.c: Likewise.
847 * coff-mcore.c: Likewise.
848 * coff-ppc.c: Likewise.
849 * coff-rs6000.c: Likewise.
850 * coff-sh.c: Likewise.
851 * coff-tic54x.c: Likewise.
852 * coff-tic80.c: Likewise.
853 * coff64-rs6000.c: Likewise.
854 * coffcode.h: Likewise.
855 * coffgen.c: Likewise.
856 * cofflink.c: Likewise.
857 * ecofflink.c: Likewise.
858 * elf-hppa.h: Likewise.
859 * elf.c: Likewise.
860 * elf32-arm.h: Likewise.
861 * elf32-cris.c: Likewise.
862 * elf32-gen.c: Likewise.
863 * elf32-hppa.c: Likewise.
864 * elf32-i370.c: Likewise.
865 * elf32-i386.c: Likewise.
866 * elf32-m32r.c: Likewise.
867 * elf32-mcore.c: Likewise.
868 * elf32-mips.c: Likewise.
869 * elf32-ppc.c: Likewise.
870 * elf32-s390.c: Likewise.
871 * elf32-sh.c: Likewise.
872 * elf32-sparc.c: Likewise.
873 * elf32-v850.c: Likewise.
874 * elf64-alpha.c: Likewise.
875 * elf64-gen.c: Likewise.
876 * elf64-ppc.c: Likewise.
877 * elf64-s390.c: Likewise.
878 * elf64-sparc.c: Likewise.
879 * elf64-x86-64.c: Likewise.
880 * elflink.h: Likewise.
881 * elfxx-ia64.c: Likewise.
882 * ieee.c: Likewise.
883 * ihex.c: Likewise.
884 * libbfd.c: Likewise.
885 * pdp11.c: Likewise.
886 * pe-mips.c: Likewise.
887 * peicode.h: Likewise.
888 * srec.c: Likewise.
889 * xcofflink.c: Likewise.
890
891 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
892
893 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
894 error message.
895
896 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
897 error message.
898
899 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
900 Consolidate error messages, and split long messages to two lines.
901
902 2001-09-20 John Reiser <jreiser@BitWagon.com>
903
904 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
905 and info->allow_shlib_undefined.
906 * elf32-cris.c: Likewise.
907 * elf32-hppa.c: Likewise.
908 * elf32-m68k.c: Likewise.
909 * elf32-mips.c: Likewise.
910 * elf32-ppc.c: Likewise.
911 * elf32-s390.c: Likewise.
912 * elf32-sh.c: Likewise.
913 * elf32-sparc.c: Likewise.
914 * elf64-alpha.c: Likewise.
915 * elf64-hppa.c: Likewise.
916 * elf64-ppc.c: Likewise.
917 * elf64-s390.c: Likewise.
918 * elf64-sparc.c: Likewise.
919 * elf64-x86-64.c: Likewise.
920 * elfxx-ia64.c: Likewise.
921
922 2001-09-18 Bruno Haible <haible@clisp.cons.org>
923
924 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
925 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
926 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
927 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
928 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
929 (bfd_default_scan): Use ISDIGIT instead of isdigit.
930 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
931 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
932 isxdigit/isdigit/islower.
933 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
934 (mangle_name): Use ISALNUM instead of isalnum.
935 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
936 (scan): Use ISDIGIT instead of isdigit.
937 * hosts/alphavms.h: Don't include <ctype.h>.
938 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
939 (ieee_object_p): Use TOUPPER instead of toupper.
940 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
941 (ihex_bad_byte): Use ISPRINT instead of isprint.
942 * merge.c: Don't include <ctype.h>.
943 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
944 (oasys_write_sections): Use ISDIGIT instead of isdigit.
945 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
946 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
947 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
948 (mangle_name): Use ISALNUM instead of isalnum.
949 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
950 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
951 isupper/islower/isdigit.
952 (som_decode_symclass): Use TOUPPER instead of toupper.
953 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
954 (srec_bad_byte): Use ISPRINT instead of isprint.
955 (srec_scan): Use ISSPACE instead of isspace.
956 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
957 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
958 * syms.c: Include "safe-ctype.h"
959 (islower, toupper): Remove macro definitions.
960 (bfd_decode_symclass): Use TOUPPER instead of toupper.
961 * vms-gsd.c: Don't include <ctype.h>.
962 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
963 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
964 islower/toupper.
965 * vms-tir.c: Don't include <ctype.h>.
966
967 2001-09-18 Alan Modra <amodra@bigpond.net.au>
968
969 * libbfd.c (bfd_bread): New function replacing bfd_read without
970 redundant params. Allow reads up to (size_t) -2 in length.
971 (bfd_bwrite): Similarly for bfd_write.
972 (real_read): Return a size_t.
973 (bfd_read): Call bfd_bread.
974 (bfd_write): Call bfd_bwrite.
975 (warn_deprecated): New function to annoy everybody.
976 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
977 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
978 (bfd_read, bfd_write): Define as macro.
979 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
980 likewise for bfd_write. Ensure function args are correct size by
981 using casts or local vars. In some cases, remove unnecessary
982 casts. Formatting fixes, in some cases removing a large expression
983 from function args by using a local var. Replace CONST with const.
984 Modify variable types to avoid warings. Use casts to avoid
985 warnings when using negative numbers in unsigned expressions.
986 * aout-adobe.c: Likewise.
987 * aout-arm.c: Likewise.
988 * aout-cris.c: Likewise.
989 * aout-encap.c: Likewise.
990 * aout-ns32k.c: Likewise.
991 * aout-target.h: Likewise.
992 * aout-tic30.c: Likewise.
993 * aoutf1.h: Likewise.
994 * aoutx.h: Likewise.
995 * archive.c: Likewise.
996 * archures.c: Likewise.
997 * bfd-in.h: Likewise.
998 * bfd.c: Likewise.
999 * binary.c: Likewise.
1000 * bout.c: Likewise.
1001 * cache.c: Likewise.
1002 * cisco-core.c: Likewise.
1003 * coff-a29k.c: Likewise.
1004 * coff-alpha.c: Likewise.
1005 * coff-arm.c: Likewise.
1006 * coff-h8300.c: Likewise.
1007 * coff-h8500.c: Likewise.
1008 * coff-i386.c: Likewise.
1009 * coff-i860.c: Likewise.
1010 * coff-i960.c: Likewise.
1011 * coff-ia64.c: Likewise.
1012 * coff-m68k.c: Likewise.
1013 * coff-m88k.c: Likewise.
1014 * coff-mcore.c: Likewise.
1015 * coff-mips.c: Likewise.
1016 * coff-ppc.c: Likewise.
1017 * coff-rs6000.c: Likewise.
1018 * coff-sh.c: Likewise.
1019 * coff-sparc.c: Likewise.
1020 * coff-stgo32.c: Likewise.
1021 * coff-tic30.c: Likewise.
1022 * coff-tic54x.c: Likewise.
1023 * coff-tic80.c: Likewise.
1024 * coff-w65.c: Likewise.
1025 * coff-z8k.c: Likewise.
1026 * coff64-rs6000.c: Likewise.
1027 * coffcode.h: Likewise.
1028 * coffgen.c: Likewise.
1029 * cofflink.c: Likewise.
1030 * coffswap.h: Likewise.
1031 * corefile.c: Likewise.
1032 * cpu-arc.c: Likewise.
1033 * cpu-h8300.c: Likewise.
1034 * cpu-h8500.c: Likewise.
1035 * cpu-i960.c: Likewise.
1036 * cpu-ia64-opc.c: Likewise.
1037 * cpu-ns32k.c: Likewise.
1038 * cpu-pdp11.c: Likewise.
1039 * cpu-pj.c: Likewise.
1040 * cpu-sh.c: Likewise.
1041 * cpu-w65.c: Likewise.
1042 * cpu-z8k.c: Likewise.
1043 * dwarf1.c: Likewise.
1044 * dwarf2.c: Likewise.
1045 * ecoff.c: Likewise.
1046 * ecofflink.c: Likewise.
1047 * ecoffswap.h: Likewise.
1048 * elf-bfd.h: Likewise.
1049 * elf-hppa.h: Likewise.
1050 * elf-m10200.c: Likewise.
1051 * elf-m10300.c: Likewise.
1052 * elf.c: Likewise.
1053 * elf32-arc.c: Likewise.
1054 * elf32-arm.h: Likewise.
1055 * elf32-avr.c: Likewise.
1056 * elf32-cris.c: Likewise.
1057 * elf32-fr30.c: Likewise.
1058 * elf32-gen.c: Likewise.
1059 * elf32-h8300.c: Likewise.
1060 * elf32-hppa.c: Likewise.
1061 * elf32-i370.c: Likewise.
1062 * elf32-i386.c: Likewise.
1063 * elf32-i860.c: Likewise.
1064 * elf32-m32r.c: Likewise.
1065 * elf32-m68k.c: Likewise.
1066 * elf32-mcore.c: Likewise.
1067 * elf32-mips.c: Likewise.
1068 * elf32-openrisc.c: Likewise.
1069 * elf32-pj.c: Likewise.
1070 * elf32-ppc.c: Likewise.
1071 * elf32-s390.c: Likewise.
1072 * elf32-sh-lin.c: Likewise.
1073 * elf32-sh.c: Likewise.
1074 * elf32-sparc.c: Likewise.
1075 * elf32-v850.c: Likewise.
1076 * elf64-alpha.c: Likewise.
1077 * elf64-hppa.c: Likewise.
1078 * elf64-mips.c: Likewise.
1079 * elf64-ppc.c: Likewise.
1080 * elf64-s390.c: Likewise.
1081 * elf64-sparc.c: Likewise.
1082 * elf64-x86-64.c: Likewise.
1083 * elfarm-nabi.c: Likewise.
1084 * elfcode.h: Likewise.
1085 * elfcore.h: Likewise.
1086 * elflink.c: Likewise.
1087 * elflink.h: Likewise.
1088 * elfxx-ia64.c: Likewise.
1089 * elfxx-target.h: Likewise.
1090 * format.c: Likewise.
1091 * hash.c: Likewise.
1092 * hp300hpux.c: Likewise.
1093 * hppabsd-core.c: Likewise.
1094 * hpux-core.c: Likewise.
1095 * i386aout.c: Likewise.
1096 * i386dynix.c: Likewise.
1097 * i386linux.c: Likewise.
1098 * i386lynx.c: Likewise.
1099 * i386mach3.c: Likewise.
1100 * i386msdos.c: Likewise.
1101 * i386os9k.c: Likewise.
1102 * ieee.c: Likewise.
1103 * ihex.c: Likewise.
1104 * irix-core.c: Likewise.
1105 * libaout.h: Likewise.
1106 * libbfd-in.h: Likewise.
1107 * libbfd.c: Likewise.
1108 * libcoff-in.h: Likewise.
1109 * libecoff.h: Likewise.
1110 * libieee.h: Likewise.
1111 * libnlm.h: Likewise.
1112 * libpei.h: Likewise.
1113 * libxcoff.h: Likewise.
1114 * linker.c: Likewise.
1115 * lynx-core.c: Likewise.
1116 * m68klinux.c: Likewise.
1117 * merge.c: Likewise.
1118 * mipsbsd.c: Likewise.
1119 * netbsd-core.c: Likewise.
1120 * nlm.c: Likewise.
1121 * nlm32-alpha.c: Likewise.
1122 * nlm32-i386.c: Likewise.
1123 * nlm32-ppc.c: Likewise.
1124 * nlm32-sparc.c: Likewise.
1125 * nlmcode.h: Likewise.
1126 * nlmswap.h: Likewise.
1127 * ns32k.h: Likewise.
1128 * oasys.c: Likewise.
1129 * opncls.c: Likewise.
1130 * osf-core.c: Likewise.
1131 * pc532-mach.c: Likewise.
1132 * pdp11.c: Likewise.
1133 * pe-mips.c: Likewise.
1134 * peXXigen.c: Likewise.
1135 * peicode.h: Likewise.
1136 * ppcboot.c: Likewise.
1137 * ptrace-core.c: Likewise.
1138 * reloc.c: Likewise.
1139 * reloc16.c: Likewise.
1140 * riscix.c: Likewise.
1141 * rs6000-core.c: Likewise.
1142 * sco5-core.c: Likewise.
1143 * section.c: Likewise.
1144 * som.c: Likewise.
1145 * sparclinux.c: Likewise.
1146 * sparclynx.c: Likewise.
1147 * srec.c: Likewise.
1148 * stabs.c: Likewise.
1149 * sunos.c: Likewise.
1150 * syms.c: Likewise.
1151 * targets.c: Likewise.
1152 * tekhex.c: Likewise.
1153 * trad-core.c: Likewise.
1154 * versados.c: Likewise.
1155 * vms-gsd.c: Likewise.
1156 * vms-hdr.c: Likewise.
1157 * vms-misc.c: Likewise.
1158 * vms-tir.c: Likewise.
1159 * vms.c: Likewise.
1160 * vms.h: Likewise.
1161 * xcofflink.c: Likewise.
1162 * bfd-in2.h: Regenerate.
1163 * libbfd.h: Regenerate.
1164 * libcoff.h: Regenerate.
1165
1166 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1167 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1168 (ufile_ptr): Define.
1169 (bfd_tell): Return a ufile_ptr.
1170 * libbfd.c (bfd_tell): Likewise.
1171 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1172 unnecessarily.
1173 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1174 * aoutf1.h: Likewise.
1175 * som.c: Likewise.
1176 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1177 larger than unsigned long can represent.
1178
1179 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1180 size overflows size_t.
1181 (bfd_realloc): Likewise.
1182 (bfd_zmalloc): Likewise.
1183 * opncls.c (bfd_alloc): Likewise.
1184 (bfd_zalloc): Likewise.
1185 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1186 (bfd_alloc, bfd_zalloc): Update.
1187
1188 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1189 8 bits.
1190 (bfd_get_signed_8): Likewise.
1191 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1192 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1193 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1194 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1195 * libaout.h: Likewise define and use here.
1196 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1197 * aout-arm.c: Likewise.
1198 * aout-encap.c: Likewise.
1199 * aout-ns32k.c: Likewise.
1200 * aout-tic30.c: Likewise.
1201 * aoutf1.h: Likewise.
1202 * aoutx.h: Likewise.
1203 * bout.c: Likewise.
1204 * coff-alpha.c: Likewise.
1205 * coff-h8300.c: Likewise.
1206 * coff-h8500.c: Likewise.
1207 * coff-i960.c: Likewise.
1208 * coff-ia64.c: Likewise.
1209 * coff-m88k.c: Likewise.
1210 * coff-mips.c: Likewise.
1211 * coff-ppc.c: Likewise.
1212 * coff-rs6000.c: Likewise.
1213 * coff-sh.c: Likewise.
1214 * coff-sparc.c: Likewise.
1215 * coff-stgo32.c: Likewise.
1216 * coff-tic30.c: Likewise.
1217 * coff-tic80.c: Likewise.
1218 * coff-w65.c: Likewise.
1219 * coff-z8k.c: Likewise.
1220 * coff64-rs6000.c: Likewise.
1221 * coffgen.c: Likewise.
1222 * cofflink.c: Likewise.
1223 * coffswap.h: Likewise.
1224 * ecoff.c: Likewise.
1225 * ecoffswap.h: Likewise.
1226 * elf.c: Likewise.
1227 * elf32-mips.c: Likewise.
1228 * elf64-mips.c: Likewise.
1229 * hp300hpux.c: Likewise.
1230 * i386dynix.c: Likewise.
1231 * i386lynx.c: Likewise.
1232 * i386msdos.c: Likewise.
1233 * i386os9k.c: Likewise.
1234 * libpei.h: Likewise.
1235 * nlm32-alpha.c: Likewise.
1236 * nlm32-i386.c: Likewise.
1237 * nlm32-ppc.c: Likewise.
1238 * nlmcode.h: Likewise.
1239 * nlmswap.h: Likewise.
1240 * oasys.c: Likewise.
1241 * pdp11.c: Likewise.
1242 * pe-mips.c: Likewise.
1243 * peXXigen.c: Likewise.
1244 * peicode.h: Likewise.
1245 * riscix.c: Likewise.
1246 * sunos.c: Likewise.
1247 * xcofflink.c: Likewise.
1248 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1249 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1250 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1251 equivalent H_PUT_* macro instead.
1252 (GETWORD, GETHALF, GETBYTE): Similarly.
1253 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1254 (GETWORD, GETHALF, GETBYTE): Likewise.
1255 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1256
1257 * bfd-in.h (struct orl): Change "pos" to a union.
1258 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1259 (bsd_write_armap): Here too.
1260 (coff_write_armap): And here.
1261 * coff-rs6000.c (xcoff_write_armap_old): And here.
1262 (xcoff_write_one_armap_big): And here.
1263 (xcoff_write_armap_big): And here.
1264 * ecoff.c (_bfd_ecoff_write_armap): And here.
1265 * elf64-mips.c (mips_elf64_write_armap): And here.
1266
1267 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1268 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1269 * elf32-h8300.c (elf32_h8_mach): Likewise.
1270 * elf32-mips.c (elf_mips_mach): Likewise.
1271 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1272
1273 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1274 calls.
1275 (aix386_core_vec): Typo fix.
1276
1277 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1278 etc. to avoid redefined macro warning.
1279 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1280 (MY(fix_pcrel_26)): Likewise.
1281 * aout-ns32k.c (MY(put_reloc)): Likewise.
1282 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1283 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1284 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1285
1286 * aout-encap.c: Include "file", not <file> for binutils headers.
1287 (encap_object_p): Half baked attempt to fix compile errors in
1288 code dealing with "magic".
1289
1290 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1291 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1292 bfd_vma's rather than longs.
1293 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1294 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1295 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1296 remove case 3.
1297 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1298 Use unsigned comparisons.
1299 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1300 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1301 (_bfd_do_ns32k_reloc_contents): Likewise.
1302 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1303 (_bfd_ns32k_get_immediate): Likewise.
1304 (_bfd_ns32k_put_displacement): Likewise.
1305 (_bfd_ns32k_put_immediate): Likewise.
1306 (bfd_reloc_status_type): Likewise.
1307
1308 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1309 to avoid shadowing.
1310 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1311 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1312 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1313 avoid shadowing.
1314 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1315 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1316 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1317 shadow warning.
1318 (_bfd_elfcore_strndup): Likewise for "dup".
1319 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1320 "name" to avoid shadowing.
1321 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1322 definition of "off".
1323 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1324 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1325 definition of "s".
1326 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1327 "secpp".
1328 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1329 to avoid shadowing.
1330 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1331 to avoid shadowing.
1332 (elf_link_input_bfd): Likewise.
1333 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1334 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1335 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1336 "input_section".
1337 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1338 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1339 (sunos_write_dynamic_symbol): Remove unused vars.
1340 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1341 innermost "directory_name" and "file_name" vars.
1342 * tekhex.c (first_phase): Rename local var "type" to "stype".
1343 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1344 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1345 doing comparison at caller.
1346 (vms_esecflag_by_name): Likewise.
1347 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1348 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1349 (xcoff_write_global_symbol): Rename "p" param to "inf".
1350
1351 * cisco-core.c: Add missing prototypes.
1352 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1353 (cisco_core_file_failing_signal): Likewise.
1354 (cisco_core_file_matches_executable_p): Likewise.
1355 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1356 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1357 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1358 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1359
1360 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1361 thumb_glue_size and arm_glue_size.
1362 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1363
1364 * coff64-rs6000.c: Group prototypes together.
1365
1366 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1367 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1368
1369 * cpu-arc.c: Add missing prototypes.
1370 * cpu-h8500.c: Likewise.
1371 * cpu-i960.c: Likewise.
1372 * cpu-pj.c: Likewise.
1373 * cpu-sh.c: Likewise.
1374 * cpu-w65.c: Likewise.
1375 * cpu-z8k.c: Likewise.
1376 * elf32-fr30.c: Likewise.
1377 * elf32-h8300.c: Likewise.
1378 * elf32-i370.c: Likewise.
1379 * hpux-core.c: Likewise.
1380 * versados.c: Likewise.
1381
1382 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1383 * cpu-h8500.c: Likewise.
1384 * cpu-i960.c: Likewise.
1385 * cpu-z8k.c: Likewise.
1386
1387 * cpu-ia64-opc.c: Correct comment.
1388
1389 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1390
1391 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1392 to unsigned.
1393 (bfd_elf32_write_out_phdrs): Likewise.
1394 (bfd_elf64_write_out_phdrs): Likewise.
1395 (elf_linker_section_pointers): Change addend to bfd_vma.
1396 (_bfd_elf_find_pointer_linker_section): Likewise.
1397 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
1398 filepos to unsigned file_ptr.
1399 (_bfd_elfcore_strndup): Change max param to size_t.
1400 * elf.c (_bfd_elfcore_make_pseudosection): As above.
1401 (_bfd_elfcore_strndup): Likewise.
1402 (_bfd_elf_find_pointer_linker_section): Likewise.
1403
1404 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1405 insn and sym_value to ints.
1406
1407 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1408 bfd_size_type.
1409 (elfcore_read_notes): Likewise.
1410
1411 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
1412 param from unsigned char to int.
1413 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
1414 for info_to_howto call.
1415 (add_dynamic_entry): Define macro.
1416 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
1417
1418 * elf32-cris.c (add_dynamic_entry): Define macro.
1419 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
1420
1421 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
1422 (elf32_h8_object_p): Likewise.
1423 (elf32_h8_merge_private_bfd_data): Likewise.
1424 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
1425
1426 * elf32-hppa.c (add_dynamic_entry): Define macro.
1427 (elf32_hppa_size_dynamic_sections): Use it.
1428 * elf32-i370.c (add_dynamic_entry): Define macro.
1429 (i370_elf_size_dynamic_sections): Use it.
1430 (i370_noop): Make static.
1431 * elf32-i386.c (add_dynamic_entry): Define macro.
1432 (elf_i386_size_dynamic_sections): Use it.
1433 * elf32-m68k.c (add_dynamic_entry): Define macro.
1434 (elf_m68k_size_dynamic_sections): Use it.
1435 * elf32-ppc.c (add_dynamic_entry): Define macro.
1436 (ppc_elf_size_dynamic_sections): Use it.
1437 * elf32-s390.c (add_dynamic_entry): Define macro.
1438 (elf_s390_size_dynamic_sections): Use it.
1439 * elf64-alpha.c (add_dynamic_entry): Define macro.
1440 (elf64_alpha_size_dynamic_sections): Use it.
1441 * elf64-hppa.c (add_dynamic_entry): Define macro.
1442 (elf64_hppa_size_dynamic_sections): Use it.
1443 * elf64-ppc.c (add_dynamic_entry): Define macro.
1444 (ppc64_elf_size_dynamic_sections): Use it.
1445 * elf64-s390.c (add_dynamic_entry): Define macro.
1446 (elf_s390_size_dynamic_sections): Use it.
1447 * elf64-sparc.c (add_dynamic_entry): Define macro.
1448 (sparc64_elf_size_dynamic_sections): Use it.
1449 * elf64-x86-64.c (add_dynamic_entry): Define macro.
1450 (elf64_x86_64_size_dynamic_sections): Use it.
1451 * elfxx-ia64.c (add_dynamic_entry): Define macro.
1452 (elfNN_ia64_size_dynamic_sections): Use it.
1453
1454 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1455 (v850_elf_perform_relocation): Make "r_type" param unsigned.
1456
1457 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
1458 false if the first malloc fails rather than going via error_return.
1459
1460 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
1461 "index" param.
1462 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
1463
1464 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
1465
1466 * elfxx-ia64.c (global_sym_index): Return a long.
1467
1468 * ieee.c (get_symbol): Use int rather than char param.
1469 (ieee_slurp_sections): Move "section" var to inner blocks.
1470 (copy_expression): Don't init "value" to zero or worry about
1471 clearing to zero after using.
1472 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
1473 shadowing.
1474
1475 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
1476 unsigned int.
1477
1478 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
1479 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
1480
1481 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
1482
1483 * pc532-mach.c (MYNSX): Delete.
1484 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
1485 (write_object_contents): Correct prototype.
1486
1487 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
1488 than unsigned short.
1489
1490 * section.c (bfd_set_section_contents): Remove redundant
1491 "offset < 0" test. Check that "count" doesn't overflow size_t.
1492 (bfd_get_section_contents): Likewise.
1493
1494 * som.c (som_fixup_formats): Add missing braces.
1495 (som_reloc_addend): Pass a bfd_vma for "addend".
1496
1497 * srec.c (srec_write_record): Pass "type" as an unsigned int.
1498 (srec_write_symbols): Remove an unnecessary var.
1499
1500 * targets.c (_bfd_target_vector): Sort entries. Sort externs
1501 to match.
1502 * configure.in: Sort to match. Bump version number.
1503 * configure: Regenerate.
1504
1505 * tekhex.c (move_section_contents): Assert offset == 0.
1506
1507 * versados.c (new_symbol_string): Constify arg.
1508 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
1509 (versados_get_symbol_info): Make static.
1510 (versados_print_symbol): Likewise.
1511 (versados_get_reloc_upper_bound): Likewise.
1512 (versados_canonicalize_reloc): Likewise.
1513
1514 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
1515
1516 * elflink.h (elf_link_input_bfd): Fix typo in error message.
1517
1518 2001-09-17 H.J. Lu <hjl@gnu.org>
1519
1520 * dwarf1.c (parse_die): Take a new arg for the end of the
1521 section. Return false if die is beyond the section.
1522 (parse_functions_in_unit): Pass the end of the section to
1523 parse_die ().
1524 (_bfd_dwarf1_find_nearest_line): Likewise.
1525
1526 2001-09-14 Michael Rauch <mrauch@netbsd.org>
1527
1528 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
1529 just like R_SPARC_32.
1530
1531 2001-09-14 Kevin Lo <kevlo@openbsd.org>
1532
1533 * configure.bfd: Add arm-openbsd target.
1534
1535 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1536
1537 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
1538 Add support for mips64.
1539
1540 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
1541
1542 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
1543
1544 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1545
1546 * elf.c (prep_headers): Get the machine code from the elf
1547 backend data.
1548 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
1549 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
1550 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1551 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1552 * elf-arc.c (arc_elf_final_write_processing): Don't override
1553 e_machine, it's now properly set in prep_headers.
1554 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
1555 EM_AVR_OLD.
1556 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
1557 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
1558 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
1559 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
1560 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
1561 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
1562 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
1563 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
1564 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
1565 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
1566 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
1567 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
1568
1569 2001-09-11 Richard Henderson <rth@redhat.com>
1570
1571 * elf64-alpha.c (elf64_alpha_section_flags): New.
1572 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
1573
1574 2001-09-11 Richard Henderson <rth@redhat.com>
1575
1576 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
1577 apply HINT relocations against dynamic symbols.
1578
1579 2001-09-11 H.J. Lu <hjl@gnu.org>
1580
1581 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
1582
1583 2001-09-09 Richard Henderson <rth@redhat.com>
1584
1585 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
1586
1587 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
1588 following a call to a near function.
1589
1590 2001-09-08 Richard Henderson <rth@redhat.com>
1591
1592 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
1593 relocation errors. Fail gp-relative relocations against
1594 dynamic symbols.
1595
1596 2001-09-08 Alan Modra <amodra@bigpond.net.au>
1597
1598 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
1599 as well as DEF_DYNAMIC in test for avoided copy relocs.
1600 (allocate_plt_and_got_and_discard_relocs): Likewise.
1601 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
1602 (allocate_plt_and_got_and_discard_relocs): Likewise.
1603
1604 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1605
1606 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
1607 of R_MIPS_PC16.
1608
1609 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1610
1611 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
1612 definitions.
1613 (mips_elf64_howto_table_rel): Likewise.
1614
1615 2001-09-05 Tom Rix <trix@redhat.com>
1616
1617 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
1618 and syscall symbols.
1619 (write_global_symbol) : Same.
1620 (bfd_xcoff_export_symbol): Remove unused syscall param.
1621 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
1622 bfd_xcoff_import_symbol.
1623 * bfd-in.h: Same.
1624 * bfd-in2.h : Regenerate.
1625
1626 2001-09-04 Richard Henderson <rth@redhat.com>
1627
1628 * elf64-alpha.c (SKIP_HOWTO): New.
1629 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
1630 Fix sizes of 16-bit mem format relocs.
1631 (elf64_alpha_reloc_map): Update to match.
1632 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
1633 (elf64_alpha_relax_without_lituse): Likewise.
1634 (elf64_alpha_check_relocs): Handle GPREL16.
1635 (elf64_alpha_relocate_section): Likewise.
1636 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
1637 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
1638 * bfd-in2.h, libbfd.h: Rebuild.
1639
1640 2001-09-04 Jeff Law <law@redhat.com>
1641
1642 * elf32-h8300.c (elf32_h8_relax_section): New function.
1643 (elf32_h8_relax_delete_bytes): Likewise.
1644 (elf32_h8_symbol_address_p): Likewise.
1645 (elf32_h8_get_relocated_section_contents): Likewise.
1646 (bfd_elf32_bfd_relax_section): Define.
1647 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1648
1649 * elf32-h8300.c (special): New function.
1650 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
1651 all relocations.
1652 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
1653 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
1654 Fix minor problems with 8bit and 16bit PC relative relocations.
1655
1656 2001-09-01 Andreas Jaeger <aj@suse.de>
1657
1658 * vms-tir.c: Add missing prototypes.
1659 * vms-hdr.c: Likewise.
1660 * vms-gsd.c: Likewise.
1661 * vms-misc.c: Likewise.
1662
1663 2001-08-31 H.J. Lu <hjl@gnu.org>
1664
1665 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
1666 with bad relocation.
1667
1668 2001-08-31 Eric Christopher <echristo@redhat.com>
1669 Jason Eckhardt <jle@redhat.com>
1670
1671 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
1672 mips32_4k and mips64.
1673 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
1674 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
1675 * bfd/cpu-mips.c: Ditto.
1676 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
1677 * bfd/bfd-in2.h: Regenerate.
1678
1679 2001-08-31 Jakub Jelinek <jakub@redhat.com>
1680
1681 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
1682 value into R_ALPHA_RELATIVE's addend.
1683 (elf64_alpha_finish_dynamic_symbol): Likewise.
1684
1685 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
1686
1687 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
1688 recomputed addend during relocatable link if not USE_REL.
1689
1690 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
1691 error.
1692
1693 2001-08-30 H.J. Lu <hjl@gnu.org>
1694
1695 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
1696 2 changes.
1697 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
1698 relocations for weak definitions.
1699
1700 2001-08-30 H.J. Lu <hjl@gnu.org>
1701
1702 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
1703 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
1704 * Makefile.in: Rebuild.
1705
1706 2001-08-30 H.J. Lu <hjl@gnu.org>
1707
1708 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1709 dynamic relocation for undefined weak symbols when creating
1710 executables. Check h->root.root.type, instead of h->root.type.
1711
1712 2001-08-29 Joel Sherrill <joel@OARcorp.com>
1713
1714 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
1715 default from coff to elf.
1716
1717 2001-08-29 Jeff Law <law@redhat.com>
1718
1719 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
1720 relocations.
1721 (h8_reloc_map): Similarly.
1722 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
1723 Add support for PC relative relocations.
1724
1725 * elf32-h8300.c: Put all prototypes together.
1726 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
1727 (elf32_h8_final_link_relocate): New function for linker.
1728 (elf32_h8_relocate_section): Similarly.
1729 (elf_backend_relocate_section): Define.
1730
1731 * cpu-h8300.c (h8300_scan, compatible): Prototype.
1732 (h8300_scan): Handle architecture:machine encodings typically
1733 found in linker scripts.
1734 * elf.c (prep_headers): Do not try to do H8 machine recognition
1735 here.
1736 * elf32-h8300.c: Add some missing prototypes.
1737 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
1738 (elf32_h8_object_p): Similarly.
1739
1740 2001-08-29 Tom Rix <trix@redhat.com>
1741
1742 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
1743 does not follow a XTY_SD.
1744
1745 2001-08-29 Alan Modra <amodra@bigpond.net.au>
1746
1747 * targmatch.sed: Delete case statements.
1748 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
1749 aix4.3 and above.
1750
1751 Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
1752
1753 * Makefile.am (elf32-h8300.lo): New target.
1754 * config.bfd (h8300*-*-elf): New case.
1755 * configure.in (bfd_elf32_h8300_vec): New case.
1756 * elf.c (prep_headers): Add case for bfd_arch_h8300.
1757 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
1758 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
1759 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
1760 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
1761 * elf32-h8300.c: New file.
1762 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
1763
1764 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
1765
1766 * sparclynx.c: Add missing prototypes.
1767 * coff-mcore.c: Add missing prototypes.
1768 * elf32-pj.c: Add missing prototypes.
1769 * nlm32-sparc.c: Add missing prototypes.
1770 * oasys.c: Add missing prototypes.
1771 * pdp11.c: Add missing prototypes.
1772 * pe-mips.c: Add missing prototypes.
1773 * riscix.c: Add missing prototypes.
1774
1775 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
1776
1777 * elf32-i386.c: Add missing prototypes.
1778 * elf32-ppc.c: Likewise.
1779 * elf32-sh-lin.c: Likewise.
1780 * elfarm-nabi.c: Likewise.
1781
1782 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
1783
1784 * elf32-i386.c (elf_i386_grok_prstatus): New function.
1785 (elf_i386_grok_psinfo): New function.
1786 (elf_backend_grok_prstatus): Define.
1787 (elf_backend_grok_psinfo): Likewise.
1788 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
1789 (ppc_elf_grok_psinfo): New function.
1790 (elf_backend_grok_prstatus): Define.
1791 (elf_backend_grok_psinfo): Likewise.
1792 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
1793 (elf32_shlin_grok_psinfo): New function.
1794 (elf_backend_grok_prstatus): Define.
1795 (elf_backend_grok_psinfo): Likewise.
1796 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
1797 (elf32_arm_nabi_grok_psinfo): New function.
1798 (elf_backend_grok_prstatus): Define.
1799 (elf_backend_grok_psinfo): Likewise.
1800
1801 2001-08-27 H.J. Lu <hjl@gnu.org>
1802
1803 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
1804 sanity check.
1805 (mips_elf_calculate_relocation): Create dynamic relocation for
1806 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
1807 bit is not set.
1808
1809 2001-08-27 H.J. Lu <hjl@gnu.org>
1810
1811 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
1812 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1813 (_bfd_elf32_mips_grok_prstatus): Likewise.
1814 (_bfd_elf32_mips_grok_psinfo): Likewise.
1815 (_bfd_mips_elf_hide_symbol): Make it static and cast to
1816 `struct mips_elf_link_hash_entry *'.
1817 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
1818
1819 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
1820
1821 * mipsbsd.c: Add missing prototypes.
1822 * hp300hpux.c: Add missing prototypes.
1823 * i386aout.c: Add missing prototypes.
1824 * i386lynx.c: Add missing prototypes.
1825 * i386mach3.c: Add missing prototypes.
1826 * i386msdos.c: Add missing prototypes.
1827 * i386os9k.c: Add missing prototypes.
1828
1829 2001-08-27 Linus Nordberg <linus@swox.se>
1830 Torbjorn Granlund <tege@swox.com>
1831 Staffan Ulfberg <staffanu@swox.se>
1832 Alan Modra <amodra@bigpond.net.au>
1833
1834 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
1835 targ64_selvecs for 32 bit powerpc targets.
1836 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
1837 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
1838 Run "make dep-am".
1839 * Makefile.in: Regenerate.
1840 * configure.in: Add elf64_powerpc vecs.
1841 * configure: Regenerate.
1842 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
1843 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
1844 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
1845 * elf64-ppc.c: New file.
1846 * reloc.c: Add powerpc64 relocs.
1847 * libbfd.h: Regenerate.
1848 * bfd-in2.h: Regenerate.
1849
1850 2001-08-27 Andreas Schwab <schwab@suse.de>
1851
1852 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
1853 reloc is against read-only section.
1854 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
1855 looking up section names for DT_TEXTREL.
1856 (elf32_m68k_reloc_type_class): New function.
1857 (elf_backend_reloc_type_class): Define.
1858
1859 2001-08-27 Andreas Jaeger <aj@suse.de>
1860
1861 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1862 reloc is against read-only section.
1863 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1864 looking up section names for DT_TEXTREL.
1865 (elf_s390_reloc_type_class): New.
1866 (elf_backend_reloc_type_class): Define.
1867
1868 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1869 reloc is against read-only section.
1870 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1871 looking up section names for DT_TEXTREL.
1872 (elf_s390_reloc_type_class): New.
1873 (elf_backend_reloc_type_class): Define.
1874
1875 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
1876 is against read-only section.
1877 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1878 looking up section names for DT_TEXTREL.
1879 (ppc_elf_reloc_type_class): New.
1880 (elf_backend_reloc_type_class): Define.
1881
1882 2001-08-26 Andreas Jaeger <aj@suse.de>
1883
1884 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
1885 reloc is against read-only section.
1886 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
1887 looking up section names for DT_TEXTREL.
1888 (elf_cris_reloc_type_class): New.
1889 (elf_backend_reloc_type_class): Define.
1890
1891 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
1892 against read-only section.
1893 (elf_backend_reloc_type_class): Define.
1894 (sh_elf_reloc_type_class): New.
1895 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1896 looking up section names for DT_TEXTREL.
1897
1898 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
1899 reloc is against read-only section.
1900 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
1901 looking up section names for DT_TEXTREL.
1902 (elf32_arm_reloc_type_class): New.
1903 (elf_backend_reloc_type_class): Define.
1904
1905 2001-08-25 Andreas Jaeger <aj@suse.de>
1906
1907 * oasys.c: Add missing prototypes.
1908
1909 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
1910 attribute for parameter.
1911 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1912
1913 * versados.c (get_4): Make static.
1914 (get_10): Make static.
1915 Add missing prototypes.
1916 (process_esd): Fix call to versados_new_symbol.
1917
1918 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
1919
1920 * coff-a29k.c: Add missing prototypes.
1921 * coff-apollo.c: Add missing prototypes.
1922 * coff-arm.c: Add missing prototypes.
1923 * coff-i860.c: Add missing prototypes.
1924 * coff-rs6000.c: Add missing prototypes.
1925 * coff-tic80.c: Add missing prototypes.
1926 * elf-m10200.c: Add missing prototypes.
1927 * elf-m10300.c: Add missing prototypes.
1928 * elf32-arm.h: Add missing prototypes.
1929 * elf32-d10v.c: Add missing prototypes.
1930 * elf32-m32r.c: Add missing prototypes.
1931 * elf32-mcore.c: Add missing prototypes.
1932 * elf32-openrisc.c: Add missing prototypes.
1933 * elf32-sh.c: Add missing prototypes.
1934 * elf32-sparc.c: Add missing prototypes.
1935 * elf32-v850.c: Add missing prototypes.
1936 * elfarm-nabi.c: Add missing prototypes.
1937 * elfarm-oabi.c: Add missing prototypes.
1938
1939 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1940
1941 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
1942 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
1943
1944 2001-08-24 H.J. Lu <hjl@gnu.org>
1945
1946 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
1947 hash structure.
1948
1949 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
1950
1951 * elf-bfd.h (elf_hash_table): Revert definition.
1952 (is_elf_hash_table): New macro.
1953 * elflink.h (elf_link_add_object_symbols): Test
1954 is_elf_hash_table before accessing ELF only fields in hash
1955 structure.
1956 (elf_link_create_dynamic_sections): Fail if not using an ELF
1957 hash structure.
1958 (elf_add_dynamic_entry): Fail if not using an ELF hash
1959 structure.
1960 (elf_link_record_local_dynamic_symbol): Fail if not using an
1961 ELF hash structure.
1962 (size_dynamic_sections): Fail if not using an ELF hash
1963 structure.
1964 (elf_adjust_dynamic_symbol): Fail if not using an ELF
1965 hash structure.
1966 (elf_bfd_final_link): Fail if not using an ELF hash
1967 structure.
1968
1969 2001-08-24 H.J. Lu <hjl@gnu.org>
1970
1971 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
1972 table is not an ELF linker hash table.
1973
1974 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
1975 table type to bfd_link_elf_hash_table.
1976
1977 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
1978 the last change.
1979
1980 * linker.c (_bfd_link_hash_table_init): Set the linker hash
1981 table type to bfd_link_generic_hash_table.
1982
1983 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1984
1985 * bfd.c (bfd_alt_mach_code): New function.
1986 * bfd-in2.h: Rebuilt.
1987
1988 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1989
1990 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
1991 `type' field in the hash entry when deciding whether to follow a
1992 link.
1993
1994 2001-08-24 Jakub Jelinek <jakub@redhat.com>
1995
1996 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
1997 last.
1998 (elf_link_sort_relocs): Adjust accordingly.
1999
2000 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
2001 (elf64_alpha_check_relocs): Set it if section this reloc is against
2002 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
2003 read-only section.
2004 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
2005 is is against read-only section.
2006 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
2007 check section names.
2008 (elf64_alpha_reloc_type_class): New.
2009 (elf_backend_reloc_type_class): Define.
2010
2011 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2012
2013 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
2014 by bfd_malloc().
2015
2016 2001-08-23 Andreas Jaeger <aj@suse.de>
2017
2018 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
2019 the reloc is against read-only section.
2020 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
2021 of looking up section names for DT_TEXTREL.
2022 (elf64_x86_64_reloc_type_class): New.
2023 (elf_backend_reloc_type_class): Define.
2024
2025 2001-08-23 H.J. Lu <hjl@gnu.org>
2026
2027 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
2028 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
2029
2030 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
2031 bfd_print_symbol_vandf.
2032 * coffgen.c (coff_print_symbol): Likewise.
2033 * elf.c (bfd_elf_print_symbol): Likewise.
2034 * ieee.c (ieee_print_symbol): Likewise.
2035 * nlmcode.h (nlm_print_symbol): Likewise.
2036 * oasys.c (oasys_print_symbol): Likewise.
2037 * pdp11.c (NAME(aout,print_symbol)): Likewise.
2038 * som.c (som_print_symbol): Likewise.
2039 * srec.c (srec_print_symbol): Likewise.
2040 * tekhex.c (tekhex_print_symbol): Likewise.
2041 * versados.c (versados_print_symbol): Likewise.
2042 * vms.c (vms_print_symbol): Likewise.
2043
2044 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
2045 with bfd_fprintf_vma.
2046 (bfd_elf_print_symbol): Likewise.
2047 * syms.c (bfd_print_symbol_vandf): Likewise.
2048
2049 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2050
2051 * aoutf1.h (sunos_write_object_contents): Silence compile time
2052 warning.
2053 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
2054
2055 * bout.c: Add missing function prototypes. Fix formatting.
2056 * coff-z8k.c: Add missing function prototypes. Fix formatting.
2057 * coff-w65.c: Add missing function prototypes. Fix formatting.
2058 * coff-h8500.c: Add missing function prototypes. Fix formatting.
2059 * coff-h8300.c: Add missing function prototypes. Fix formatting.
2060 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
2061 * coff-tic30.c: Add missing function prototypes. Fix formatting.
2062 * coff-m68k.c: Add missing function prototypes. Fix formatting.
2063 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
2064 * coff-sh.c: Add missing function prototypes. Fix formatting.
2065
2066 2001-08-23 Jakub Jelinek <jakub@redhat.com>
2067
2068 * elf-bfd.h (enum elf_reloc_type_class): New.
2069 (struct elf_backend_data): Add elf_backend_reloc_type_class.
2070 (_bfd_elf_reloc_type_class): New.
2071 * elfxx-target.h (elf_backend_reloc_type_class): Define.
2072 (elfNN_bed): Add elf_backend_reloc_type_class.
2073 * elf.c (_bfd_elf_reloc_type_class): New.
2074 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
2075 is against read-only section.
2076 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
2077 looking up section names for DT_TEXTREL.
2078 (elf_i386_reloc_type_class): New.
2079 (elf_backend_reloc_type_class): Define.
2080 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
2081 reloc is against read-only section.
2082 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
2083 looking up section names for DT_TEXTREL.
2084 (elf32_sparc_reloc_type_class): New.
2085 (elf_backend_reloc_type_class): Define.
2086 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
2087 reloc is against read-only section.
2088 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2089 looking up section names for DT_TEXTREL.
2090 (sparc64_elf_reloc_type_class): New.
2091 (elf_backend_reloc_type_class): Define.
2092 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2093 (elfNN_ia64_hash_table_create): Clear ia64_info.
2094 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2095 section.
2096 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2097 instead of looking up section names for DT_TEXTREL.
2098 (elfNN_ia64_reloc_type_class): New.
2099 (elf_backend_reloc_type_class): Define.
2100 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2101 (struct elf_link_sort_rela): New.
2102 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2103 (elf_bfd_final_link): Call elf_link_sort_relocs.
2104 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2105 necessary.
2106
2107 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2108
2109 * configure.in (x86-bsdi): No corefile support.
2110 * configure: Regenerate.
2111
2112 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2113
2114 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2115 comma.
2116
2117 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2118
2119 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2120 the alignment of dwarf2 linkonce sections to 0.
2121 * coff-sto32.c: Likewise.
2122
2123 2001-08-20 Andreas Jaeger <aj@suse.de>
2124
2125 * coff-sparc.c: Add missing prototypes.
2126 * elf32-s390.c: Likewise.
2127 * elf32-i960.c: Likewise.
2128 * aout-target.h: Likewise.
2129
2130 2001-08-20 H.J. Lu <hjl@gnu.org>
2131
2132 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2133 (elf_num_section_syms): New for num_section_syms.
2134
2135 * elf.c (elf_map_symbols): Set num_section_syms.
2136 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2137 the section symbol index.
2138
2139 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2140
2141 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2142 select the generic has table creator. All elf backends need elf
2143 specific fields in the hash table.
2144
2145 2001-08-20 Alan Modra <amodra@bigpond.net.au>
2146
2147 * archive.c (offsetof): Remove define.
2148 * elf.c: Likewise.
2149 * oasys.c: Likewise
2150 * sysdep.h (offsetof): Define.
2151
2152 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2153
2154 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2155 (bfd_set_gp_size): Make param unsigned.
2156 * bfd-in2.h: Regenerate.
2157 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2158 than calling bfd_get_gp_size.
2159 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2160 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2161
2162 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2163
2164 * linker.c (default_fill_link_order): Handle four byte fill value.
2165
2166 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2167
2168 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2169 prototype.
2170 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2171
2172 * elf64-mips.c (UNUSED_RELOC): Define.
2173 (mips_elf64_howto_table_rel): Use it.
2174 (mips_elf64_howto_table_rela): Here too.
2175 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2176
2177 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2178 silence warning.
2179 * coffgen.c (coff_print_symbol): Fix warnings.
2180 (coff_find_nearest_line): Likewise.
2181 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2182 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2183 * format.c (bfd_check_format_matches): Likewise.
2184 (bfd_set_format): Likewise.
2185 * coff-ia64.c: Add missing prototypes.
2186 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2187 signed to silence warnings.
2188 (elf64_alpha_relocate_section): Likewise.
2189 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2190 (elf64_alpha_add_symbol_hook): Likewise.
2191 (elf64_alpha_final_link): Likewise.
2192 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2193 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2194 (elf64_alpha_size_got_sections): Likewise.
2195 * elfxx-ia64.c: Add missing prototypes.
2196 (elfNN_ia64_relocate_section): Fix warning.
2197 (elfNN_ia64_unwind_entry_compare): Make params const.
2198
2199 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2200
2201 * config.bfd (targ64_selvecs): New.
2202 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2203
2204 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2205 (BFD_DEFAULT_TARGET_SIZE): New.
2206 (BFD_ARCH_SIZE): Comment.
2207 * configure.in (target_size): New. Set instead of target64 in
2208 selvecs case statement. Set target64 from it.
2209 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2210 * bfd-in2.h: Regenerate.
2211 * configure: Regenerate.
2212
2213 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2214
2215 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2216 (bfd_errmsgs): Add corresponding message.
2217 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2218 finding an archive that contains different format object files.
2219 Return bfd_error_wrong_object_format for this case.
2220 * format.c: Formatting fixes. s/CONST/const/.
2221 (bfd_check_format_matches): Accept archives that give
2222 bfd_error_wrong_object_format if no full match is found. Tidy
2223 code handling matching_vector. Don't return a pointer to freed
2224 memory in `matching'. Handle ambiguous matches as for partial
2225 archive matches.
2226 * bfd-in2.h: Regenerate.
2227
2228 2001-08-15 Alan Modra <amodra@bigpond.net.au>
2229
2230 * libieee.h (common_header_type): Add last_byte field.
2231
2232 * ieee.c: Add missing prototypes. Some format fixes.
2233 (struct output_buffer_struct): Move for availability to prototypes.
2234 (ieee_part_after): New function.
2235 (ieee_slurp_debug): Use it here.
2236 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2237 ieee_part_after to set last_byte to one past end of current part.
2238 Update callers.
2239 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2240 Update callers.
2241 (parse_expression): Don't go beyond the end of the current part.
2242 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2243 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2244 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2245 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2246 ieee_set_section_contents, ieee_write_object_contents,
2247 ieee_make_empty_symbol): Make static.
2248 (ieee_archive_p): Correct comments regarding bfd_read.
2249 (ieee_object_p): Similarly.
2250 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2251 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2252 input_bfd, output_bfd, output_buffer.
2253 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2254 do_with_relocs, ie. as a symbol for relocatable files.
2255 (ieee_vec): Add comments showing functions referenced by macros.
2256
2257 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2258
2259 * aout-tic30.c: Add missing prototypes. Fix formatting.
2260 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2261 * peXXigen.c: Add missining prototypes. Fix formatting.
2262 * aout-adobe.c: Add missining prototypes. Fix formatting.
2263
2264 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2265
2266 * elf32-v850.c: Add missing function prototypes.
2267 Fix some formatting.
2268
2269 * cpu-v850.c: Add missing function prototype.
2270 Fix some formatting.
2271
2272 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2273
2274 * elf-bfd.h (struct elf_backend_data): Add new fields
2275 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2276 (bfd_elf_sprintf_vma): Rename function prototype to
2277 '_bfd_elf_sprintf_vma'.
2278 (bfd_elf_fprintf_vma): Rename function prototype to
2279 '_bfd_elf_fprintf_vma'.
2280 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2281 directly, instead indirect via the elf_backend_data structure.
2282 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2283 instead indirect via the elf_backend_data structure.
2284 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2285 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2286 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2287 already defined.
2288 (elf_backend_fprintf_vma): Initialise if not already defined.
2289 (struct elf_backend_data): Initialise the
2290 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2291
2292 2001-08-10 Andreas Jaeger <aj@suse.de>
2293
2294 * elf64-sparc.c: Add missing prototypes.
2295 * elf32-cris.c: Likewise.
2296 * elf32-i370.c: Likewise.
2297 * elf64-hppa.c: Likewise.
2298 * elf64-s390.c: Likewise.
2299
2300 2001-08-10 Andreas Jaeger <aj@suse.de>
2301
2302 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2303 Add prototypes where needed.
2304
2305 2001-08-10 H.J. Lu <hjl@gnu.org>
2306
2307 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2308 (bfd_fprintf_vma): Likewise.
2309
2310 2001-08-10 H.J. Lu <hjl@gnu.org>
2311
2312 * bfd.c (bfd_sprintf_vma): Don't return void.
2313 (bfd_fprintf_vma): Likewise.
2314
2315 2001-08-10 Andreas Jaeger <aj@suse.de>
2316
2317 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2318 to build warnings.
2319 * configure: Regenerate.
2320
2321 2001-08-10 Alan Modra <amodra@bigpond.net.au>
2322
2323 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2324 warning if not BFD64. Add braces so emacs auto format works.
2325 (bfd_elf_fprintf_vma): Likewise.
2326
2327 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2328 of _xcoff_swap_ld*.
2329 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2330 param to agree with libxcoff.h.
2331 (xcoff_swap_ldhdr_out): Likewise.
2332 (xcoff_swap_ldsym_in): Likewise.
2333 (xcoff_swap_ldsym_out): Likewise.
2334 (xcoff_swap_ldrel_in): Likewise.
2335 (xcoff_swap_ldrel_out): Likewise.
2336 (xcoff_create_csect_from_smclas): Likewise.
2337 * coff64-rs6000.c: Add missing prototypes.
2338 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2339 with libxcoff.h.
2340 (xcoff64_swap_ldhdr_out): Likewise.
2341 (xcoff64_swap_ldsym_in): Likewise.
2342 (xcoff64_swap_ldsym_out): Likewise.
2343 (xcoff64_swap_ldrel_in): Likewise.
2344 (xcoff64_swap_ldrel_out): Likewise.
2345 (xcoff64_ppc_relocate_section): Make static.
2346 (xcoff64_slurp_armap): Likewise.
2347 (xcoff64_archive_p): Likewise.
2348 (xcoff64_openr_next_archived_file): Likewise.
2349 (xcoff64_sizeof_headers): Likewise.
2350 (xcoff64_is_lineno_count_overflow): Likewise.
2351 (xcoff64_is_reloc_count_overflow): Likewise.
2352 (xcoff64_loader_symbol_offset): Likewise.
2353 (xcoff64_loader_reloc_offset): Likewise.
2354 * elf64-gen.c: Add missing prototypes.
2355
2356 2001-08-09 H.J. Lu <hjl@gnu.org>
2357
2358 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2359 (bfd_elf_fprintf_vma): Likewise.
2360
2361 2001-08-09 H.J. Lu <hjl@gnu.org>
2362
2363 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2364 to ...
2365 * elf-bfd.h: Here.
2366 * bfd-in2.h: Regenerated.
2367
2368 2001-08-09 H.J. Lu <hjl@gnu.org>
2369
2370 * bfd-in.h (bfd_sprintf_vma): New prototype.
2371 (bfd_fprintf_vma): Likewise.
2372 (bfd_elf_sprintf_vma): Likewise.
2373 (bfd_elf_fprintf_vma): Likewise.
2374 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2375 * bfd-in2.h: Regenerated.
2376
2377 * bfd.c (bfd_sprintf_vma): New. Defined.
2378 (bfd_fprintf_vma): Likewise.
2379
2380 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2381 (bfd_elf_fprintf_vma): Likewise.
2382
2383 2001-08-09 Alan Modra <amodra@bigpond.net.au>
2384
2385 * coff-rs6000.c: Add missing prototypes.
2386 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2387 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2388 xcoff_loader_reloc_offset): Make static.
2389 * dwarf1.c: Add missing prototypes.
2390 * dwarf2.c: Add missing prototypes.
2391 (struct abbrev_info): Move definition.
2392 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2393 * elf.c: Add missing prototypes.
2394 * elf32-gen.c: Likewise.
2395 * elf32-i386.c: Likewise.
2396 * elf32-ppc.c: Likewise.
2397 (ppc_elf_sort_rela): Use PTR instead of "void *".
2398 * elflink.h: Add missing prototypes. Formatting fixes.
2399 * merge.c: Add missing prototypes.
2400 (last4_eq): Use PTR instead of "void *".
2401 (last_eq): Likewise.
2402 * syms.c: Add missing prototypes.
2403
2404 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2405
2406 * bfd.c: Fix formatting.
2407 * bfd-in2.h: Regenerate.
2408
2409 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2410
2411 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
2412 true (this target uses REL relocations) and 'pcrel_offset' to
2413 false (the PC is implied, not stored in the offset).
2414
2415 2001-08-08 Alan Modra <amodra@bigpond.net.au>
2416
2417 1999-10-19 Linus Nordberg <linus@swox.se>
2418 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
2419 * elfxx-target.h (elf_backend_want_got_sym): Define.
2420 (elfNN_bed): Add elf_backend_want_got_sym.
2421 * elflink.c (_bfd_elf_create_got_section): Define
2422 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2423
2424 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
2425
2426 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
2427 (find_rela_addend): New function.
2428 (parse_comp_unit): Call it to find the abbrev offset addend.
2429 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
2430 members of dwarf2_debug as debugging information is read.
2431
2432 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
2433
2434 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2435 targets as well as sh-pe.
2436
2437 2001-08-03 Ben Harris <bjh21@netbsd.org>
2438
2439 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
2440 reloc from start of section when computing value for R_ARM_REL32
2441 reloc.
2442
2443 2001-08-03 Alan Modra <amodra@bigpond.net.au>
2444
2445 From H.J. Lu <hjl@gnu.org>
2446 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
2447 keep relocs for undefined syms if there are no dynamic sections in
2448 executable.
2449 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2450
2451 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
2452
2453 * cofflink.c (coff_link_check_ar_symbols): also search for
2454 __imp__symbol as well as _symbol.
2455 * linker.c (_bfd_generic_link_add_archive_symbols): also
2456 search for __imp__symbol as well as _symbol.
2457
2458 2001-08-01 Adam Nemet <anemet@lnxw.com>
2459
2460 * elf.c (elf_sort_sections): Return zero only as the last step.
2461
2462 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
2463
2464 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
2465 ARM_COFF_BUGFIX.
2466 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
2467 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
2468 ARM_COFF_BUGFIX.
2469
2470 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2471
2472 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
2473 to match corresponding bfd_coff_backend data member.
2474
2475 2001-07-24 Alan Modra <amodra@bigpond.net.au>
2476
2477 * Makefile.am: Update dependencies with "make dep-am".
2478 * Makefile.in: Regenerate
2479
2480 2001-07-15 H.J. Lu <hjl@gnu.org>
2481
2482 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
2483 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
2484 * Makefile.in: Regenerate.
2485
2486 2001-07-11 H.J. Lu <hjl@gnu.org>
2487
2488 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
2489 flags when creating the reloc section if the ALLOC flag in the
2490 source section is set.
2491
2492 2001-07-11 Steve Ellcey <sje@cup.hp.com>
2493
2494 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
2495 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
2496 * bfd-in2.h: Regenerate.
2497 * libbfd.h: Regenerate.
2498 * elfxx-ia64.c (ia64_howto_table): Define how to handle
2499 new relocations.
2500 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
2501 (elfNN_ia64_check_relocs): Likewise.
2502 (elfNN_ia64_install_value): Likewise.
2503 (elfNN_ia64_relocate_section): Likewise.
2504
2505 2001-07-11 Jakub Jelinek <jakub@redhat.com>
2506
2507 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
2508 R_SPARC_UA64.
2509 (elf32_sparc_check_relocs): Likewise.
2510 Only create .rela section for alloced sections in shared libraries.
2511 (elf32_sparc_relocate_section): Likewise.
2512 Remove redundant check.
2513 Optimize unaligned reloc usage.
2514 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
2515 check.
2516
2517 2001-07-11 H.J. Lu <hjl@gnu.org>
2518
2519 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
2520 ALLOC|LOAD flags as the source section for debugging sections
2521 when creating the reloc section.
2522
2523 2001-07-05 Jim Wilson <wilson@redhat.com>
2524
2525 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
2526 the section of the bigger symbol.
2527
2528 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
2529
2530 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
2531
2532 * peicode.h (coff_swap_scnhdr_in): For sections containing
2533 uninitialised data, only set their size to s_paddr if this does
2534 not reset their size to zero. MS's latest compilers will set
2535 s_paddr to zero.
2536
2537 2001-07-04 H.J. Lu <hjl@gnu.org>
2538
2539 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
2540 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
2541 bfd_mach_mips5000.
2542
2543 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
2544
2545 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
2546
2547 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
2548 sections being discarded.
2549
2550 2001-06-30 Alan Modra <amodra@bigpond.net.au>
2551
2552 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
2553 instead of _bfd_elfcore_section_from_phdr.
2554 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
2555 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
2556 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
2557 (elfcore_grok_prstatus): Likewise.
2558 (elfcore_grok_lwpstatus): Likewise.
2559 (bfd_get_elf_phdr_upper_bound): Likewise.
2560 (elfcore_make_note_pseudosection): Formatting.
2561 (_bfd_elfcore_strndup): Formatting.
2562 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
2563 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
2564
2565 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
2566
2567 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
2568 and _bfd_elfcore_strndup.
2569 (struct elf_backend_data): Add elf_backend_grok_prstatus
2570 and elf_backend_grok_psinfo.
2571 * elf.c (_bfd_elfcore_make_pseudosection): New function.
2572 (elfcore_grok_prstatus): Use it.
2573 (elfcore_make_note_pseudosection): Likewise.
2574 (elfcore_strndup): Rename to...
2575 (_bfd_elfcore_strndup): Here, and make global.
2576 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
2577 (elfcore_grok_note): Call elf_backend_grok_prstatus
2578 and elf_backend_grok_psinfo if available.
2579 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
2580 (_bfd_elf32_mips_grok_psinfo): New function.
2581 (elf_backend_grok_prstatus): Define.
2582 (elf_backend_grok_psinfo): Define.
2583 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
2584 (elf_backend_grok_psinfo): Likewise.
2585 (elfNN_bed): Include elf_backend_grok_prstatus and
2586 elf_backend_grok_psinfo.
2587
2588 2001-06-29 H.J. Lu <hjl@gnu.org>
2589
2590 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
2591 hplink->sgot is NULL before filling GOT. Check if hplink->splt
2592 is NULL before filling PLT.
2593
2594 2001-06-29 Alan Modra <amodra@bigpond.net.au>
2595
2596 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
2597
2598 2001-06-27 Alan Modra <amodra@bigpond.net.au>
2599
2600 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
2601 here..
2602 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
2603 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2604 after gc has run.
2605
2606 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
2607 (IS_ABSOLUTE_RELOC): Define.
2608 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
2609 (hppa_link_hash_newfunc): Always init it.
2610 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
2611 create COPY relocs only when the reloc is in a read-only section.
2612 Instead, allocate space for a dynamic reloc to reference the
2613 library symbol directly. Keep track of space we allocate using
2614 relocs_entries.
2615 (hppa_discard_copies): Delete, and move code to..
2616 (allocate_plt_and_got): ..here. Rename to
2617 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2618 relocs for non-shared link.
2619 (elf32_hppa_size_dynamic_sections): Update calls to above.
2620 (elf32_hppa_relocate_section): Write out the dynamic relocs used
2621 in lieu of COPY relocs.
2622
2623 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
2624 here..
2625 (elf_i386_adjust_dynamic_symbol): ..nor here..
2626 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2627 after gc has run.
2628 (elf_i386_size_dynamic_sections): Fix a comment.
2629 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
2630 involved in writing reloc out.
2631
2632 2001-06-25 Alan Modra <amodra@bigpond.net.au>
2633
2634 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
2635 Ensure syms are dynamic if we might be emitting a reloc.
2636 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
2637 for undefweak or undefined syms..
2638 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
2639
2640 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
2641 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
2642 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
2643 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
2644
2645 2001-06-24 H.J. Lu <hjl@gnu.org>
2646
2647 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
2648 strncasecmp/strcasecmp instead of strncmp/strcmp.
2649
2650 2001-06-23 H.J. Lu <hjl@gnu.org>
2651
2652 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
2653 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
2654 in the regular object file and treat the weak definition as
2655 the normal one.
2656
2657 2001-06-23 Alan Modra <amodra@bigpond.net.au>
2658
2659 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
2660 unresolved_reloc test to exclude cases where we use "relocation"
2661 before setting it to point into the .got. Reinstate fudge for
2662 unresolved relocs in debugging sections.
2663
2664 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
2665 complicated tests for unresolvable relocs with a simple direct
2666 scheme using "unresolved_reloc" var.
2667
2668 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
2669 elf_i386_dyn_relocs. Update comment.
2670 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
2671 dyn_relocs.
2672 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
2673 others to aborts.
2674 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
2675 abort.
2676 (elf_i386_size_dynamic_sections): Likewise.
2677 (elf_i386_finish_dynamic_symbol): Likewise.
2678 (elf_i386_finish_dynamic_sections): Likewise.
2679 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
2680 handling code.
2681
2682 Avoid creating COPY relocs if possible.
2683 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
2684 which .got created. Mark symbols used by R_386_32 and R_386_PC32
2685 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
2686 reloc is in a read-only section. Instead, allocate space for a
2687 dynamic reloc to reference the library symbol directly. Keep
2688 track of space we allocate using pcrel_relocs_copied.
2689 (discard_copies): Delete, and move code to ..
2690 (allocate_plt_and_got): ..here. Rename to
2691 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2692 relocs for non-shared link.
2693 (elf_i386_size_dynamic_sections): Update calls to above functions.
2694 (elf_i386_relocate_section): Write out the dynamic relocs. Add
2695 more ugly logic to avoid "unresolvable relocation" error. Use
2696 htab shortcut in place of elf_hash_table macro.
2697 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
2698 not always be created now.
2699
2700 2001-06-20 Bo Thorsen <bo@suse.co.uk>
2701
2702 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
2703 shared libraries.
2704
2705 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2706
2707 * configure.host (mips64-*-linux): Reformat.
2708
2709 2001-06-21 Alan Modra <amodra@bigpond.net.au>
2710
2711 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
2712 allocate local .got space. Use shortcuts from hash table for .got
2713 and .plt rather than comparing section names.
2714 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
2715 adjusting index into local_got_refcounts to document what we are
2716 really doing.
2717 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
2718 Tidy .got and .plt error checking.
2719
2720 2001-06-20 Catherine Moore <clm@redhat.com>
2721
2722 * elf-bfd.h (struct elf_backend_data):
2723 elf_backend_emit_relocs: New field: Function for emitting
2724 relocs.
2725 elf_backend_count_relocs: New field: Function for determining
2726 the number of relocs to be emitted.
2727 * elfxx-target.h: Provide default (NULL) values for
2728 elf_backend_emit_relocs and elf_backend_count_relocs.
2729 * elflink.h (elf_link_size_reloc_section): Make the hash table
2730 big enough to hold the relocs counted by either reloc_count or
2731 o->reloc_count.
2732 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
2733 should be emitted, either because of a command line option
2734 stored in the info structure or because the target provides a
2735 special reloc emitting function.
2736 If the target provides a reloc counting function use it,
2737 unless performing a relocatable link or emitting all relocs.
2738 Also set the SEC_RELOC flag on any output section which will
2739 contain relocs.
2740 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
2741 should be emitted, either because of a command line option
2742 stored in the info structure or because the target provides a
2743 special reloc emitting function.
2744 If the target provides a reloc emitting function, use it,
2745 unless performing a relocatable link or emitting all relocs.
2746
2747 2001-06-20 H.J. Lu <hjl@gnu.org>
2748
2749 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
2750 allocate local .got space.
2751
2752 2001-06-19 Andreas Jaeger <aj@suse.de>
2753
2754 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
2755 dynamic symbols.
2756
2757 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
2758
2759 * elflink.h (struct elf_assign_sym_version_info): Remove member
2760 export_dynamic. All users changed to use info member.
2761 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
2762 export_dynamic, instead use member in parameter info.
2763 * bfd-in.h (bfd_elf32_size_dynamic_sections,
2764 bfd_elf64_size_dynamic_sections): Update prototype.
2765 * bfd-in2.h: Regenerate.
2766
2767 2001-06-18 H.J. Lu <hjl@gnu.org>
2768
2769 * elflink.h (elf_info_failed): Add a new field, verdefs.
2770 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
2771 elf_export_symbol.
2772 (elf_export_symbol): Check eif->verdefs to decide if a symbol
2773 should be exported.
2774
2775 2001-06-17 H.J. Lu <hjl@gnu.org>
2776
2777 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
2778 readonly_reloc, to record if a relocation in the .rel.dyn
2779 section is against a read-only section.
2780 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
2781 field to false.
2782 (_bfd_mips_elf_check_relocs): Record if there is a relocation
2783 in the .rel.dyn section against a read-only section by setting
2784 DF_TEXTREL or readonly_reloc.
2785 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
2786 it is true.
2787 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
2788 there is a relocation in the .rel.dyn section against a
2789 read-only section.
2790 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
2791 DF_TEXTREL is set.
2792
2793 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
2794
2795 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
2796 function. Move flagword result into parameter list. Remove
2797 comment about setting bfd_error_handler to intercept failure
2798 results.
2799 * coffgen.c (make_a_section_from_file): Examine result of
2800 calling bfd_coff_styp_to_sec_flags and pass a failure back to
2801 caller.
2802 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
2803 function. Move flagword result into parameter list.
2804 * libcoff.h: Regenerate.
2805 * libecoff.h: Regenerate.
2806
2807 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
2808
2809 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
2810 section is going to follow it.
2811
2812 2001-06-12 Catherine Moore <clm@redhat.com>
2813
2814 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
2815 with the file_align entry from elf_backend_data.
2816 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2817 (elf_gc_record_vtentry): Likewise.
2818
2819 2001-06-10 Alan Modra <amodra@bigpond.net.au>
2820
2821 * elflink.h: Whitespace changes.
2822 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
2823 rather than "unsigned char".
2824 (elf_link_output_relocs): Likewise.
2825 (elf_link_input_bfd): Likewise.
2826 (elf_reloc_link_order): LIkewise.
2827 * elf.c: s/CONST/const/. Whitespace changes.
2828 * elf32-mips.c: Formatting fix.
2829
2830 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
2831 * Makefile.in: Regenerate.
2832 * po/Make-in: Remove trailing tab.
2833
2834 2001-06-09 Philip Blundell <philb@gnu.org>
2835
2836 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
2837 change.
2838 (elf32_arm_plt_entry): Likewise.
2839
2840 2001-06-08 H.J. Lu <hjl@gnu.org>
2841
2842 * elf.c (swap_out_syms): Keep names for global section symbols.
2843
2844 2001-06-07 H.J. Lu <hjl@gnu.org>
2845
2846 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
2847 MIPS-based machines need it.
2848
2849 2001-06-07 H.J. Lu <hjl@gnu.org>
2850
2851 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
2852 for SGI only.
2853
2854 * config.bfd: Remove ecoff from Linux/mips.
2855
2856 2001-06-07 Andreas Jaeger <aj@suse.de>
2857
2858 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
2859 assertion.
2860 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
2861 alignment of 8 for .rela sections; handle further relocations.
2862
2863 2001-06-06 Christian Groessler <cpg@aladdin.de>
2864
2865 * coff-z8k.c: Fix formatting.
2866 Fix howtos: howto->size was always 1.
2867
2868 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2869
2870 * configure.host (mips64*-*-linux*): Define.
2871
2872 2001-06-05 Alan Modra <amodra@bigpond.net.au>
2873
2874 * elf32-i386.c (elf_i386_discard_copies): Rename to
2875 discard_copies, and use elf_link_hash_entry arg rather than
2876 elf_i386_link_hash_entry.
2877 (elf_i386_link_hash_traverse): Delete.
2878 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
2879 Tidy sizing of dynamic sections.
2880 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
2881 possible .plt entries.
2882 (elf_i386_gc_sweep_hook): Likewise.
2883 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
2884 everything with plt.refcount <= 0.
2885
2886 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
2887 .relgot space here.
2888 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
2889 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
2890 .rel.plt here..
2891 (allocate_plt_and_got): ..instead do it all here. New function.
2892 (elf_i386_size_dynamic_sections): Allocate local .got space and
2893 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
2894 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
2895 rather than gc variety).
2896 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2897 (elf_i386_relocate_section): Use it here and correct handling of
2898 R_386_GOT32. Provide section and offset for "unresolvable
2899 relocation" error message.
2900 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
2901
2902 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
2903 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
2904 (elf_i386_link_hash_table_create): Init them.
2905 (create_got_section): New function.
2906 (elf_i386_create_dynamic_sections): New function.
2907 (elf_backend_create_dynamic_sections): Set to above.
2908 (elf_i386_check_relocs): Use shortcuts from hash table rather than
2909 calling bfd_get_section_by_name.
2910 (elf_i386_gc_sweep_hook): Likewise.
2911 (elf_i386_adjust_dynamic_symbol): Likewise.
2912 (elf_i386_size_dynamic_sections): Likewise.
2913 (elf_i386_relocate_section): Likewise.
2914 (elf_i386_finish_dynamic_sections): Likewise.
2915
2916 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
2917
2918 2001-06-02 H.J. Lu <hjl@gnu.org>
2919
2920 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
2921 and ELFOSABI_HPUX.
2922 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
2923
2924 2001-06-02 H.J. Lu <hjl@gnu.org>
2925
2926 * aout-cris.c (MACHTYPE_OK): New. Defined.
2927
2928 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
2929
2930 * section.c (_bfd_strip_section_from_output): Handle NULL
2931 output_section.
2932
2933 2001-06-02 H.J. Lu <hjl@gnu.org>
2934
2935 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
2936 rs6000coff64_vec only if BFD64 is defined.
2937 (powerpc64-*-aix*): Enable only if BFD64 is defined.
2938
2939 2001-06-02 H.J. Lu <hjl@gnu.org>
2940
2941 * coff-ia64.c (ia64coff_object_p): Rewrite with
2942 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
2943
2944 2001-06-01 Andreas Jaeger <aj@suse.de>
2945
2946 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
2947 relocation, small reformatting.
2948
2949 2001-05-29 Andreas Jaeger <aj@suse.de>
2950
2951 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
2952 (elf64_x86_64_relocate_section): Likewise.
2953
2954 2001-05-30 Alan Modra <amodra@one.net.au>
2955
2956 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
2957 millicode. Don't allocate .got and .rela.got space here..
2958 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
2959 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
2960 .rela.plt here..
2961 (hppa_handle_PIC_calls): ..nor here..
2962 (allocate_plt_and_got): ..instead do it all here. New function.
2963 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
2964 call allocate_plt_and_got. No need to zap .got if not dynamic.
2965 (elf32_hppa_final_link): Call regular bfd_final_link instead of
2966 gc_common_final_link.
2967 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2968 (elf32_hppa_relocate_section): Use it here.
2969 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
2970 dynamic_sections_created.
2971 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
2972
2973 2001-05-28 Andreas Jaeger <aj@suse.de>
2974
2975 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
2976 generic version since we want a hashsize of 4.
2977 (elf_backend_size_info): Likewise.
2978
2979 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2980
2981 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
2982 a zeroing loop.
2983 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
2984 (elf_link_input_bfd): Likewise.
2985 (elf_reloc_link_order): Likewise.
2986 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
2987 relocations correctly.
2988
2989 2001-05-28 Nicolas Pitre <nico@cam.org>
2990
2991 * elf32-arm.h: fix PLT generation for big endian ARM
2992
2993 2001-05-28 Alan Modra <amodra@one.net.au>
2994
2995 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
2996 for symbols forced local that need plabels.
2997 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
2998 .plt.rela for local syms if non-shared.
2999 (hppa_build_one_stub): Mask lsb of plt.offset.
3000 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
3001 (clobber_millicode_symbols): Correct comment.
3002 (elf32_hppa_relocate_section): Likewise.
3003 (elf32_hppa_finish_dynamic_symbol): Likewise.
3004
3005 2001-05-28 Jeff Sturm <jsturm@one-point.com>
3006
3007 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
3008 * bfd-in2.h: Regenerate.
3009 * libbfd.h: Regenerate.
3010 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
3011 and BFD_RELOC_SPARC_UA64 mapping
3012 * elf64-sparc.c: Likewise.
3013
3014 2001-05-25 H.J. Lu <hjl@gnu.org>
3015
3016 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
3017 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
3018 (coff-rs6000.lo): Remove the old dependency.
3019 * Makefile.in: Rebuild.
3020
3021 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
3022 coff-rs6000.lo.
3023
3024 2001-05-25 H.J. Lu <hjl@gnu.org>
3025
3026 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
3027 rs6000coff_core_file_matches_executable_p,
3028 rs6000coff_core_file_failing_command and
3029 rs6000coff_core_file_failing_signal only if AIX_CORE is
3030 defined.
3031 (pmac_xcoff_vec): Likewise.
3032 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3033
3034 2001-05-25 Timothy Wall <twall@redhat.com>
3035
3036 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
3037 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
3038
3039 2001-05-25 H.J. Lu <hjl@gnu.org>
3040
3041 * bfd-in2.h: Regenerated.
3042 * libcoff.h: Likewise.
3043
3044 2001-05-25 Alan Modra <amodra@one.net.au>
3045
3046 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
3047 undefined millicode syms in shared libs.
3048 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
3049 (elf32_hppa_check_relocs): Likewise.
3050 (elf32_hppa_adjust_dynamic_symbol): Likewise.
3051 (elf32_hppa_size_dynamic_sections): Likewise.
3052 (elf32_hppa_relocate_section): Likewise.
3053 (elf32_hppa_finish_dynamic_symbol): Likewise.
3054 (elf32_hppa_finish_dynamic_sections): Likewise.
3055
3056 2001-05-24 Tom Rix <trix@redhat.com>
3057
3058 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
3059 xcoff-target.h not used to define rs6000 or ppc bfd.
3060 * Makefile.in same
3061
3062 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
3063 to 64 bit.
3064
3065 * coff-rs6000.c : Many changes for 64 bit support. Move common
3066 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
3067 and pmac_xcoff_vec
3068
3069 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
3070 linker now supported. Explictly define the rs6000coff64_vec.
3071
3072 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
3073 (coff_print_aux) same
3074 (coff_write_object_contents) same
3075 (coff_slurp_line_table) same
3076
3077 * coffgen.c : (coff_fix_symbol_name) formatting
3078 (coff_mangle_symbols) xcoff 64 bit support
3079 (coff_write_symbol) same
3080 (coff_write_alien_symbol) same
3081 (coff_write_native_symbol) same
3082 (coff_write_symbols) same
3083 (coff_get_symbol_info) same
3084 (bfd_coff_get_syment) same
3085 (coff_print_symbol) same
3086
3087 * config.bfd : add powerpc64-*-aix* target
3088
3089 * libcoff-in.h : formatting
3090
3091 * libcoff.h : move xcoff extern declarations to libxcoff.h
3092
3093 * libxcoff.h : New file
3094
3095 * xcofflink.c : Many changes for xcoff64 support. Move common
3096 structures to include/coff/xcoff.h. Move specific structure to
3097 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
3098 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3099
3100 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3101 aix4.2+ -binitfini.
3102
3103 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3104
3105 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
3106
3107 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3108 s/ENTIRES/ENTRIES/.
3109
3110 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3111
3112 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3113 * libbfd.h: Regenerate.
3114 * bfd-in2.h: Regenerate.
3115
3116 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3117 * archures.c (bfd_mach_mips12000): Define.
3118 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3119 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3120 support.
3121 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3122 * bfd-in2.h: Regenerate.
3123 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3124
3125 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3126
3127 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3128 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3129 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3130 that is used by GCC.
3131
3132 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3133
3134 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3135 of entries in a structured section.
3136 * elf.c: Use new macro.
3137 * elf32-i386.c: Use new macro.
3138 * elf32-mips.c: Use new macro.
3139 * elf64-alpha.c: Use new macro.
3140 * elf64-sparc.c: Use new macro.
3141 * elfcode.h: Use new macro.
3142 * elflink.h: Use new macro.
3143
3144 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3145
3146 * bfdint.texi: Replace -oformat with --oformat.
3147
3148 2001-05-21 Andreas Jaeger <aj@suse.de>
3149
3150 * dwarf2.c (decode_line_info): Fix error message.
3151 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3152 adjust error message.
3153
3154 2001-05-18 H.J. Lu <hjl@gnu.org>
3155
3156 * elflink.h (elf_link_add_object_symbols): Revert the last
3157 change.
3158
3159 2001-05-17 Alan Modra <amodra@one.net.au>
3160
3161 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3162 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3163 (hppa_build_one_stub): Add an assert to check plt.offset.
3164
3165 2001-05-17 H.J. Lu <hjl@gnu.org>
3166
3167 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3168 version definition to basename of the output filename.
3169
3170 2001-05-17 H.J. Lu <hjl@gnu.org>
3171
3172 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3173 basename of the bfd filename.
3174
3175 2001-05-16 Alan Modra <amodra@one.net.au>
3176
3177 * section.c (asection): Add linker_has_input field.
3178 (STD_SECTION): Adjust initialization to suit.
3179 * ecoff.c (bfd_debug_section): Likewise.
3180 * bfd-in2.h: Regenerate.
3181
3182 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
3183
3184 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3185 negative 32-bit operands to 16 operands when the operand is
3186 going to be zero-extended by the modified opcode.
3187
3188 2001-05-12 Peter Targett <peter.targett@arccores.com>
3189
3190 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3191 name for 'arc5' core versions.
3192 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3193
3194 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3195 architecture.
3196 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3197
3198 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3199
3200 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3201 sections as well.
3202 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3203 to .gnu.linkonce.t.FOO text section.
3204
3205 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3206
3207 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3208 fields, change sec into secinfo.
3209 (struct sec_merge_info): Add chain, remove last fields.
3210 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3211 (sec_merge_hash_lookup): If lookup could not use a string only
3212 because it has bad alignment, mark the old string for deletion.
3213 (sec_merge_add): Add secinfo argument. Don't compute entry's
3214 position, instead record the section.
3215 (sec_merge_emit): Update for the sec into secinfo change in
3216 struct sec_merge_hash_entry.
3217 (_bfd_merge_section): Only record the section for merging, defer
3218 putting strings into the hash table.
3219 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3220 _bfd_merge_sections): New functions.
3221 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3222 changes.
3223 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3224 (_bfd_nolink_bfd_merge_sections): Define.
3225 * libbfd.h: Likewise.
3226 (bfd_generic_merge_sections): Add prototype.
3227 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3228 (struct bfd_target): Likewise.
3229 * bfd.c (bfd_merge_sections): Define.
3230 * bfd-in2.h: Rebuilt.
3231 * elf.c (_bfd_elf_merge_sections): New function.
3232 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3233 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3234 * reloc.c (bfd_generic_merge_sections): New function.
3235 * vms.c (vms_bfd_merge_sections): New function.
3236 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3237 * aout-target.h (MY_bfd_merge_sections): Define.
3238 * aout-tic30.c (MY_bfd_merge_sections): Define.
3239 * binary.c (binary_bfd_merge_sections): Define.
3240 * bout.c (b_out_bfd_merge_sections): Define.
3241 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3242 * coffcode.c (coff_bfd_merge_sections): Define.
3243 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3244 * i386msdos.c (msdos_bfd_merge_sections): Define.
3245 * i386os9k.c (os9k_bfd_merge_sections): Define.
3246 * ieee.c (ieee_bfd_merge_sections): Define.
3247 * ihex.c (ihex_bfd_merge_sections): Define.
3248 * nlm-target.h (nlm_bfd_merge_sections): Define.
3249 * oasys.c (oasys_bfd_merge_sections): Define.
3250 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3251 * som.c (som_bfd_merge_sections): Define.
3252 * srec.c (srec_bfd_merge_sections): Define.
3253 * tekhex.c (tekhex_bfd_merge_sections): Define.
3254 * versados.c (versados_bfd_merge_sections): Define.
3255 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3256
3257 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3258
3259 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3260 to be unsigned long, in order to match its use.
3261
3262 2001-05-10 H.J. Lu <hjl@gnu.org>
3263
3264 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3265 indirect symbols.
3266
3267 2001-05-09 H.J. Lu <hjl@gnu.org>
3268
3269 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3270 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3271 Remove the unused veriable `dynver'.
3272
3273 2001-05-08 Ian Lance Taylor <ian@zembu.com>
3274
3275 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3276 NULL or is not COFF.
3277 (coff_i386_rtype_to_howto): Don't dump core if output section
3278 owner is not COFF.
3279
3280 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3281
3282 * ecoff.c (bfd_debug_section): Fix initialization.
3283 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3284 is always a positive integer. Cast away sign mismatch.
3285 * elf32-mips.c: Fix misleading comment and typo.
3286 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3287 correct data type.
3288 * elflink.c: Fix typo.
3289 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3290 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3291
3292 2001-05-04 Richard Henderson <rth@redhat.com>
3293
3294 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3295
3296 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3297
3298 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3299 EF_ARM_HASENTRY if the start address is set.
3300
3301 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3302
3303 * targets.c (_bfd_target_vector_entries): Compute value based on
3304 the size of the _bfd_target_vector and not bfd_target_vector.
3305
3306 2001-05-03 H.J. Lu <hjl@gnu.org>
3307
3308 * elfcode.h: Include "libiberty.h".
3309
3310 * elflink.h (elf_link_add_object_symbols): Set
3311 elf_dt_name (abfd) to basename of the bfd filename.
3312 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3313 of the bfd filename.
3314
3315 2001-05-03 Andreas Jaeger <aj@suse.de>
3316
3317 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3318 (elf_generic_info_to_howto_rel): Likewise.
3319 * coff-alpha.c (reloc_nil): Likewise.
3320 (alpha_ecoff_bad_format_hook): Likewise.
3321 (alpha_adjust_reloc_out): Likewise.
3322 (alpha_bfd_reloc_type_lookup): Likewise.
3323 (alpha_convert_external_reloc): Likewise.
3324 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3325 (elf64_alpha_reloc_bad): Likewise.
3326 (elf64_alpha_reloc_gpdisp): Likewise.
3327 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3328 (elf64_alpha_info_to_howto): Likewise.
3329 (elf64_alpha_add_symbol_hook): Likewise.
3330 (elf64_alpha_create_got_section): Likewise.
3331 (elf64_alpha_is_local_label_name): Likewise.
3332 (elf64_alpha_merge_ind_symbols): Likewise.
3333 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3334 (mips_elf64_get_reloc_upper_bound): Likewise.
3335 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3336 (nlm_alpha_get_public_offset): Likewise.
3337
3338 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
3339
3340 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3341 about overflow in R_OPENRISC_LO_16_IN_INSN and
3342 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3343
3344 2001-04-30 H.J. Lu <hjl@gnu.org>
3345
3346 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3347 only for ELF_LINK_FORCED_LOCAL.
3348 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3349 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3350 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3351
3352 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3353 if the symbol has hidden or internal visibility.
3354
3355 2001-04-30 Alan Modra <amodra@one.net.au>
3356
3357 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3358 calls to undefined weak symbols.
3359
3360 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3361
3362 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3363 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3364
3365 2001-04-27 Andreas Jaeger <aj@suse.de>
3366
3367 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3368 out handled entries.
3369 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3370 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3371 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3372 GOT32.
3373
3374 2001-04-27 Sean McNeil <sean@mcneil.com>
3375
3376 * config.bfd: Add arm-vxworks target.
3377 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3378 addend (fro VXworks targets).
3379
3380 2001-04-26 H.J. Lu <hjl@gnu.org>
3381
3382 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3383 valid.
3384
3385 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
3386
3387 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3388 * bfd-in2.h: Regenerated.
3389
3390 2001-04-24 Jakub Jelinek <jakub@redhat.com>
3391
3392 * merge.c (struct sec_merge_hash_entry): Add alignment field.
3393 (struct sec_merge_hash): Remove alignment_power.
3394 (sec_merge_hash_newfunc): Clear alignment.
3395 (sec_merge_hash_lookup): Pass alignment as argument.
3396 Use hashp->root.next, not hashp->next to walk the hash chain.
3397 If a string already in the hashtable does not have required
3398 alignment, create a new hashtable entry.
3399 (sec_merge_init): Remove alignment_power argument.
3400 (sec_merge_add): Add alignment argument.
3401 (sec_merge_emit): Alignment is now a per-entity thing, not per
3402 section.
3403 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3404 for proper alignment.
3405 Pass alignment information to sec_merge_add.
3406
3407 2001-04-24 Christian Groessler <cpg@aladdin.de>
3408
3409 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
3410 and R_REL16 reloc types; accept odd values for R_REL16 type
3411
3412 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
3413
3414 * cpu-openrisc.c: New file.
3415 * elf32-openrisc.c: Likewise.
3416
3417 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
3418 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
3419 (BFD32_BACKENDS): Add elf32-openrisc.lo.
3420 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
3421 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
3422 * Makefile.in: Regenerated.
3423 * config.bfd: (openrisc-*-elf): New target.
3424 * configure.in (bfd_elf32_openrisc_vec): New vector.
3425 * configure: Regenerated.
3426 * libbfd.h: Regenerated.
3427 * bfd-in2.h: Regenerated.
3428 * reloc.c: Add OpenRISC relocations.
3429 * targets.c (bfd_elf32_openrisc_vec): Declare.
3430 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
3431 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
3432 (bfd_openrisc_arch): Declare.
3433 (bfd_archures_list): Add bfd_openrisc_arch.
3434 * elf.c (prep_headers): Add bfd_arch_openrisc.
3435
3436 2001-04-23 Bo Thorsen <bo@suse.de>
3437
3438 * elf64-x86-64.c: Add c++ vtable hack.
3439 Small whitespace and comment changes.
3440
3441 2001-04-19 Andreas Jaeger <aj@suse.de>
3442
3443 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
3444 (elf64_x86_64_plt_entry): Likewise.
3445 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
3446 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
3447
3448 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
3449
3450 * elf32-cris.c: Tweak comments related to dynamic linking.
3451 (cris_elf_relocate_section): When not creating shared object, fill
3452 in the .got table for any symbol not in the dynamic symbol table.
3453 (elf_cris_finish_dynamic_symbol): When not creating shared object,
3454 only emit a .got.rela reloc if the symbol is in the dynamic symbol
3455 table.
3456 (cris_elf_check_relocs): Use variable r_type in all places rather
3457 than the original expression. Add default case in switch for
3458 reloc types.
3459 (elf_cris_size_dynamic_sections): Iterate over
3460 elf_cris_discard_excess_program_dynamics when not creating shared
3461 library.
3462 (elf_cris_discard_excess_dso_dynamics): Renamed from
3463 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
3464 (elf_cris_discard_excess_program_dynamics): New.
3465
3466 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
3467
3468 * coffcode.h (coff_write_object_contents): Use
3469 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
3470
3471 2001-04-14 H.J. Lu <hjl@gnu.org>
3472
3473 * bfd-in2.h: Regenerate.
3474
3475 2001-04-14 Jakub Jelinek <jakub@redhat.com>
3476
3477 * section.c (STD_SECTION): Add entsize.
3478
3479 2001-04-13 H.J. Lu <hjl@gnu.org>
3480
3481 * section.c (SEC_MERGE): Define new flag for merging.
3482 (SEC_STRINGS): Likewise.
3483 (entsize): New field.
3484
3485 2001-04-13 Roger Sayle <roger@metaphorics.com>
3486
3487 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
3488 flag on pe-i386 targets.
3489
3490 2001-04-13 Jakub Jelinek <jakub@redhat.com>
3491
3492 * libbfd-in.h (_bfd_merge_section): New.
3493 (_bfd_write_merged_section): New.
3494 (_bfd_merged_section_offset): New.
3495 * libbfd.h: Rebuilt.
3496 * linker.c (_bfd_generic_link_output_symbols): Handle
3497 discard_sec_merge.
3498 * aoutx.h (aout_link_write_symbols): Likewise.
3499 * pdp11.c (aout_link_write_symbols): Likewise.
3500 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
3501 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
3502 sections.
3503 (elf_link_sec_merge_syms): New.
3504 (elf_link_input_bfd): Call _bfd_merged_section_offset
3505 and _bfd_write_merged_section.
3506 Handle discard_sec_merge.
3507 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
3508 field.
3509 (struct bfd_elf_section_data): Likewise.
3510 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
3511 SEC_STRINGS section flags and entsize from their ELF counterparts.
3512 (_bfd_elf_link_hash_table_init): Initialize merge_info.
3513 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
3514 from their BFD counterparts.
3515 * merge.c: New file.
3516 * Makefile.am: Add strtab.lo.
3517 * Makefile.in: Rebuilt.
3518
3519 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3520
3521 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
3522 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
3523
3524 2001-04-05 Steven J. Hill <sjhill@cotw.com>
3525
3526 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
3527 endian MIPS ELF target.
3528 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
3529 MIPS ELF target.
3530
3531 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
3532 64bit big endian MIPS ELF target.
3533 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3534 endian MIPS ELF target.
3535 * configure: Regenerated.
3536
3537 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
3538 little endian targets.
3539 (mips_elf_sym_is_global): Handle traditional targets.
3540
3541 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
3542 64bit big endian MIPS ELF target.
3543 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3544 endian MIPS ELF target.
3545
3546 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
3547 and bfd_elf64_tradlittlemips_vec.
3548
3549 2001-04-05 David Mosberger <davidm@hpl.hp.com>
3550
3551 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
3552 ordinary "progbits" section.
3553
3554 2001-04-04 Alan Modra <alan@linuxcare.com.au>
3555
3556 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
3557 when -Bsymbolic causes a symbol to no longer need a .plt entry.
3558
3559 2001-04-03 David Mosberger <davidm@hpl.hp.com>
3560
3561 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
3562
3563 2001-03-30 H.J. Lu <hjl@gnu.org>
3564
3565 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
3566 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
3567
3568 2001-03-26 H.J. Lu <hjl@gnu.org>
3569
3570 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
3571 if there are any relocations for generic ELF.
3572 (bfd_elf32_bfd_link_add_symbols): Defined to
3573 elf32_generic_link_add_symbols.
3574 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
3575 if there are any relocations for generic ELF.
3576 (bfd_elf64_bfd_link_add_symbols): Defined to
3577 elf64_generic_link_add_symbols.
3578
3579 2001-03-23 Nick Clifton <nickc@redhat.com>
3580
3581 * Makefile.am (BUILD_CFILES): New variable: List of C source
3582 files created in build directory.
3583 (BUILD_HFILES): New variable: List of header files created in
3584 build directory.
3585 (POTFILES): Delete.
3586 (po/POTFILES.in): Replace rule with empty entry.
3587 (po/SRC-POTFILES.in): New rule: Create a list of source files
3588 in the source directory.
3589 (po/BLD-POTFILES.in): New rule: Create a list of source files
3590 in the build directory.
3591 (MOSTLYCLEAN): Do not delete source files created in build
3592 directory.
3593 * Makefile.in: Regenerate.
3594 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
3595 into po/Makefile.
3596 * configure: Regenerate.
3597
3598 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
3599 and BLD_POTFILES.
3600 Add .. to the search path when building bfd.pot.
3601 Delete POTFILES when performing distclean.
3602 Add comment describing why distclean is broken in maintainer mode.
3603 * po/POTFILES.in: Delete.
3604 * po/SRC-POTFILES.in: New file.
3605 * po/BLD-POTFILES.in: New file.
3606 * po/bfd.pot: Regenerate.
3607
3608 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
3609
3610 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
3611 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
3612 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
3613 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
3614 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
3615 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
3616 functions.
3617 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
3618 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
3619 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
3620 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
3621 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
3622 New HOWTO members for new relocs.
3623 (cris_reloc_map): Map new relocs.
3624 (ELF_DYNAMIC_INTERPRETER): Define.
3625 (PLT_ENTRY_SIZE): Define.
3626 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
3627 elf_cris_pic_plt_entry): New, PLT templates.
3628 (struct elf_cris_pcrel_relocs_copied, struct
3629 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
3630 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
3631 (cris_final_link_relocate): Check that 16-bit GOT relocs have
3632 positive values. Adjust PCREL relocs to be relative to location
3633 after relocation.
3634 (cris_elf_relocate_section): Handle relocations to dynamic
3635 objects. Handle new relocations. Call error handler when seeing
3636 non-PIC relocation for read-only sections while generating shared
3637 object.
3638 (cris_elf_check_relocs): Set reference counts for GOT and PLT
3639 entries.
3640 (bfd_elf32_bfd_link_hash_table_create,
3641 elf_backend_adjust_dynamic_symbol,
3642 elf_backend_size_dynamic_sections,
3643 elf_backend_finish_dynamic_symbol,
3644 elf_backend_finish_dynamic_sections,
3645 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
3646 elf_backend_hide_symbol, elf_backend_want_got_plt,
3647 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3648 elf_backend_got_header_size, elf_backend_plt_header_size):
3649 Define.
3650
3651 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
3652 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
3653 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
3654 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
3655 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
3656 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
3657 * bfd-in2.h, libbfd.h: Regenerate.
3658
3659 2001-03-21 Diego Novillo <dnovillo@redhat.com>
3660
3661 (_bfd_mips_elf_relocate_section): Give a better error message when
3662 a relocation is not recognized.
3663
3664 2001-03-21 Alan Modra <alan@linuxcare.com.au>
3665
3666 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
3667 non-NULL before attempting to dereference.
3668
3669 2001-03-20 H.J. Lu <hjl@gnu.org>
3670
3671 * configure.in: Remove the redundent AC_ARG_PROGRAM.
3672 * configure: Rebuild.
3673
3674 2001-03-20 Andreas Schwab <schwab@suse.de>
3675
3676 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
3677 relocation value when resolving a reference from a debugging
3678 section.
3679
3680 2001-03-16 Scott Thomason <SThomaso@hii.com>
3681
3682 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
3683 (xcoff64_swap_sym_out): Fix syntax errors.
3684
3685 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
3686
3687 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
3688
3689 2001-03-15 Alan Modra <alan@linuxcare.com.au>
3690
3691 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
3692 (hppa_link_hash_newfunc): Init it.
3693 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
3694 section appears to be non-PIC.
3695 (final_link_relocate): Likewise.
3696 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
3697 possible candidate function, and set pic_call for those that will
3698 only have a .plt entry for the PIC call stub.
3699 (hppa_handle_PIC_calls): Set maybe_pic_call.
3700
3701 2001-03-12 DJ Delorie <dj@redhat.com>
3702
3703 * elf32-sh.c (sh_elf_relocate_section): Only relocation
3704 R_SH_DIR8WP* relocs if they're against external symbols, else
3705 they're just for relaxing. Validate the reloc values.
3706
3707 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
3708
3709 * binary.c (bfd_external_binary_architecture): Declare.
3710 (binary_object_p): If bfd_external_binary_architecture is defined,
3711 set the architecture to this string.
3712
3713 2001-03-11 Philip Blundell <philb@gnu.org>
3714
3715 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
3716 entries that could serve as a definition for a weak symbol.
3717
3718 2001-03-08 Nick Clifton <nickc@redhat.com>
3719
3720 * Most files: Update copyright notices using Perl script created
3721 by Kevin Buettner <kevinb@redhat.com>.
3722
3723 2001-03-07 Nick Clifton <nickc@redhat.com>
3724
3725 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
3726 prior patch on ! defined OLD_ARM_ABI.
3727
3728 2001-03-07 Andreas Jaeger <aj@suse.de>
3729
3730 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
3731 some relocation values.
3732
3733 2001-03-06 Nick Clifton <nickc@redhat.com>
3734
3735 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
3736 of offset in BLX(1) instruction.
3737 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
3738 offset in BLX(1) instruction.
3739 Fix formatting.
3740
3741 2001-03-06 Nick Clifton <nickc@redhat.com>
3742
3743 * coff-arm.c (coff_arm_reloc_type_lookup): Add
3744 BFD_RELOC_THUMB_PCREL_BLX.
3745
3746 2001-03-06 Igor Shevlyakov <igor@windriver.com>
3747
3748 * archures.c (bfd_default_scan): Add Coldfire CPUs.
3749 * bfd-in2.h: Regenerate.
3750 * cpu-m68k.c: Add Coldfire CPUs for arch table.
3751 * ieee.c (ieee_write_processor): Set proper id for
3752 Coldfire CPUs.
3753
3754 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
3755
3756 * configure.in: Add s390 target.
3757 * configure: Regenerate.
3758
3759 2001-02-28 Andreas Jaeger <aj@suse.de>
3760
3761 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
3762 to addend.
3763
3764 2001-02-28 Philip Blundell <pb@futuretv.com>
3765
3766 * elf32-arm.h: Update mentions of renamed EF_xx constants.
3767 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
3768
3769 2001-02-27 H.J. Lu <hjl@gnu.org>
3770
3771 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
3772 abfd->tdata.aout_data == NULL.
3773
3774 2001-02-27 Alan Modra <alan@linuxcare.com.au>
3775
3776 * elf32-hppa.c: Correct field selector in stub comments.
3777 (clobber_millicode_symbols): Formatting fix.
3778
3779 * configure.in: Bump version to 2.11.90.
3780 * configure: Regenerate.
3781 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
3782 (CFILES): $SOURCE_CFILES + generated C files.
3783 (POTFILES): Include $HFILES not $SOURCE_HFILES.
3784 Run "make dep-am"
3785 * Makefile.in: Regenerate.
3786 * doc/Makefile.in: This too.
3787
3788 2001-02-26 Timothy Wall <twall@cygnus.com>
3789
3790 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
3791 comments.
3792
3793 2001-02-26 Nick Clifton <nickc@redhat.com>
3794
3795 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
3796 up, replacing multiple if statements with a switch.
3797 (handle_COMDAT): New function.
3798
3799 2001-02-26 H.J. Lu <hjl@gnu.org>
3800
3801 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
3802 a warning for section flags we do not handle instead of
3803 aborting.
3804
3805 2001-02-26 Andreas Jaeger <aj@suse.de>
3806
3807 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
3808
3809 2001-02-22 Timothy Wall <twall@cygnus.com>
3810
3811 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
3812 * configure.in: Add objects for elf64_ia64_aix vectors.
3813 * configure: Regenerated.
3814 * configure.host: Recognize ia64-*-aix*.
3815 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
3816 for AIX. AIX5 requires most relocations to be dynamic (*all*
3817 binaries are somewhat similar to shared libraries).
3818 * targets.c: Add elf64_ia64_aix vectors.
3819
3820 2001-02-21 David Mosberger <davidm@hpl.hp.com>
3821
3822 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
3823 C8 said "1" instead of "8". Clarify error string for IMM22:
3824 "signed integer" instead of just "integer".
3825
3826 2001-02-20 Andreas Jaeger <aj@suse.de>
3827
3828 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
3829 PLT entries that could serve as a definition for a weak symbol.
3830
3831 2001-02-19 Jakub Jelinek <jakub@redhat.com>
3832
3833 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
3834 entries that could serve as a definition for a weak symbol.
3835 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
3836
3837 2001-02-18 David O'Brien <obrien@FreeBSD>
3838
3839 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
3840 FreeBSD/i386-CURRENT differently until I can figure out the needed
3841 corefile changes.
3842 * configure: Regenerate.
3843 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
3844 FreeBSD/PowerPC, and FreeBSD/sparc64.
3845
3846 2001-02-18 lars brinkhoff <lars@nocrew.org>
3847
3848 * Makefile.am: Add PDP-11 a.out target.
3849 * config.bfd: Likewise.
3850 * configure.in: Likewise.
3851 * targets.c: Likewise.
3852 * archures.c: Likewise.
3853 * bfd-in2.h: Likewise. Add PDP-11 relocations.
3854 * libbfd.h: Add PDP-11 relocations.
3855 * reloc.c: Likewise.
3856 * cpu-pdp11.c: New file.
3857 * pdp11.c: New file.
3858
3859 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
3860 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3861 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3862 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
3863 (GET_MAGIC): New macro.
3864 (PUT_MAGIC): Likewise.
3865 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
3866
3867 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
3868
3869 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
3870 multiarch needs it).
3871
3872 2001-02-18 H.J. Lu <hjl@gnu.org>
3873
3874 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
3875 index.
3876
3877 2001-02-18 Kazu Hirata <kazu@hxi.com>
3878
3879 * vms-misc.c: Fix formatting.
3880
3881 2001-02-16 Kazu Hirata <kazu@hxi.com>
3882
3883 * vms.c: Fix formatting.
3884
3885 2001-02-14 H.J. Lu <hjl@gnu.org>
3886
3887 * elf.c (elf_find_function): New function.
3888 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
3889 the file name and function name.
3890
3891 2001-02-14 Nick Clifton <nickc@redhat.com>
3892
3893 * ecoff.c (bfd_debug_section): Update to initialise new fields in
3894 asection structure.
3895
3896 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
3897 (BFD64_BACKENDS): Add pepigen.c
3898 Add rules to create peigen.c and pepigen.c from peXXigen.c.
3899
3900 * Makefile.in: Regenerate.
3901 * configure: Regenerate.
3902 * po/POTFILES.in: Regenerate.
3903 * po/bfd.pot: Regenerate.
3904
3905 2001-02-14 H.J. Lu <hjl@gnu.org>
3906
3907 * libcoff-in.h (pe_tdata): Add members target_subsystem and
3908 force_minimum_alignment.
3909
3910 2001-02-14 Bo Thorsen <bo@suse.de>
3911
3912 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
3913 (elf64_86_64_size_info): Struct added to fix a problem
3914 with the hashtable string entries.
3915 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
3916 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
3917 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
3918 remove the FIXME for this.
3919 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
3920 section. Also removed the FIXME for it.
3921 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
3922 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
3923 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
3924
3925 2001-02-13 Richard Henderson <rth@redhat.com>
3926
3927 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
3928 and not user provided.
3929
3930 2001-02-13 Kazu Hirata <kazu@hxi.com>
3931
3932 * vms.c (vms_print_symbol): Remove unreachable code.
3933
3934 * rs6000-core.c: Fix formatting.
3935
3936 2001-02-13 David Mosberger <davidm@hpl.hp.com>
3937
3938 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
3939 as _bfd_XXi_only_swap_filehdr_out.
3940 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
3941 pe->force_minimum_alignment to TRUE.
3942 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
3943 PEI_TARGET_SUBSYSTEM.
3944 (pe_print_private_bfd_data): Call
3945 _bfd_XX_print_private_bfd_data_common() instead of
3946 _bfd_pe_print_private_bfd_data_common().
3947 (pe_bfd_copy_private_bfd_data): Call
3948 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
3949 _bfd_pe_bfd_copy_private_bfd_data_common().
3950 (coff_bfd_copy_private_section_data): Define as
3951 _bfd_XX_bfd_copy_private_section_data instead of
3952 _bfd_pe_bfd_copy_private_section_data.
3953 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
3954 of a _bfd_pe_get_symbol_info.
3955
3956 * peigen.c: Delete.
3957
3958 * peXXigen.c: Renamed from peigen.c.
3959 (COFF_WITH_XX): Define this macro (will get expanded into
3960 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
3961 compiled as peigen.c or pepigen.c.
3962 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
3963 define the canonical PEP structures and definitions.
3964 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
3965 effect, enforce minimum file and section alignments. If
3966 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
3967 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
3968 so, by default, this is a no-op).
3969
3970 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
3971 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
3972 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
3973 _bfd_pefoo if it's not defined. Use these macros to define
3974 coff swap macros.
3975
3976 * libcoff.h (pe_tdata): Add members target_subsystem and
3977 force_minimum_alignment.
3978
3979 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
3980 COFF_WITH_pep.
3981 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
3982
3983 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
3984 peigen.lo.
3985
3986 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
3987 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
3988 PEPAOUTHDR.
3989
3990 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
3991 (BFD64_BACKENDS_CFILES): Mention pepigen.c
3992 (peigen.c): Add rule to generate from peXXigen.c.
3993 (pepigen.c): Ditto.
3994 (pepigen.lo): List dependencies for pepigen.lo.
3995
3996 2001-02-13 Alan Modra <alan@linuxcare.com.au>
3997
3998 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
3999 $global$ referenced but not defined, set its value here.
4000
4001 2001-02-09 Bo Thorsen <bo@suse.de>
4002
4003 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
4004 alignment to 3.
4005 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
4006 and relocation.
4007 (elf64_x86_64_relocate_section): Fix formatting.
4008 (elf64_x86_64_relocate_section): Fix addend for relocation of
4009 R_X86_64_(8|16|32|PC8|PC16|PC32).
4010
4011 2001-02-12 Jan Hubicka <jh@suse.cz>
4012
4013 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
4014
4015 2001-02-11 H.J. Lu <hjl@gnu.org>
4016
4017 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
4018 alignment.
4019
4020 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4021
4022 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
4023 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
4024 relocations against dynsym symbols.
4025
4026 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
4027 the R_MIPS_26 relocation.
4028 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
4029 the R_MIPS_26 relocation.
4030 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
4031 relocation.
4032 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
4033 the R_MIPS_26 relocation.
4034 (mips_elf64_howto_table_rela): Likewise.
4035
4036 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
4037 member to mark symbols that have non-CALL relocations against
4038 them.
4039 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
4040 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
4041 R_MIPS_GOT16.
4042 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
4043 non-CALL relocation against it is encountered.
4044 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
4045 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
4046 no_fn_stub is not set.
4047
4048 * elf32-mips.c (mips_elf_output_extsym): Get the output section
4049 information from the real symbol for indirect ones.
4050 Check no_fn_stub to find out if a symbol has a function stub
4051 indeed.
4052
4053 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
4054
4055 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
4056 * Makefile.in: Regenerate.
4057
4058 2001-02-09 David Mosberger <davidm@hpl.hp.com>
4059
4060 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
4061 true if section name is an unwind table section name.
4062 (elfNN_ia64_additional_program_headers): Count each unwind section
4063 separately.
4064 (elfNN_ia64_modify_segment_map): Install one unwind program header
4065 for each unwind separate section. Note: normally the linker
4066 script merges the unwind sections that go into a single segment,
4067 so this still generates at most one unwind program header per
4068 segment.
4069
4070 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
4071 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
4072 (elfNN_ia64_fake_sections): Mark sections with names that start
4073 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
4074 unwind section.
4075
4076 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
4077 Use it to make sh_info in unwind section point to the text section
4078 it applies to.
4079
4080 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
4081
4082 * Makefile.am: Add linux target for S/390.
4083 * archures.c: Likewise.
4084 * bfd-in2.h: Likewise.
4085 * config.bfd: Likewise.
4086 * configure.in: Likewise.
4087 * elf.c: Likewise.
4088 * libbfd.h: Likewise.
4089 * targets.c: Likewise.
4090 * cpu-s390.c: New file.
4091 * elf32-s390.c: New file.
4092 * elf64-s390.c: New file.
4093
4094 2001-02-09 Nick Clifton <nickc@redhat.com>
4095
4096 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4097 ImageBase. This has already been done by coff_swap_hdr_in.
4098
4099 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4100
4101 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4102
4103 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4104
4105 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4106 (sparc64_elf_relocate_section): Likewise.
4107
4108 2001-02-09 Mark Kettenis <kettenis@gnu.org>
4109
4110 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4111 similar to R_SPARC_32.
4112 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4113
4114 2001-02-08 H.J. Lu <hjl@gnu.org>
4115
4116 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4117 relocation entries for weak definitions when building DSO with
4118 -Bsymbolic.
4119
4120 2001-02-08 Richard Henderson <rth@redhat.com>
4121
4122 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4123 before visibility. Locally defined protected symbols are not
4124 dynamic.
4125
4126 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
4127
4128 * config.bfd: Enable coff64 for rs6000-*. Patch from
4129 <hzoli@austin.ibm.com>.
4130
4131 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4132
4133 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4134 found, do not attempt to find dwarf2 info before returning.
4135
4136 2001-02-07 Jakub Jelinek <jakub@redhat.com>
4137
4138 * elflink.h (is_global_symbol_definition): Rename to
4139 is_global_data_symbol_definition and have it reject function
4140 symbols.
4141 (elf_link_is_defined_archive_symbol): Use renamed function.
4142
4143 2001-02-07 Todd Vierling <tv@wasabisystems.com>
4144
4145 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4146 * libbfd.h (bfd_target_vector): Likewise.
4147 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4148 make static; create pointer reference named bfd_target_vector.
4149 (_bfd_target_vector_entries): Calculate this based on the array
4150 typed _bfd_target_vector.
4151
4152 2001-02-06 H.J. Lu <hjl@gnu.org>
4153
4154 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4155 internal symbols are not dynamic.
4156 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4157
4158 2001-02-06 Nick Clifton <nickc@redhat.com>
4159
4160 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4161 that it will not be pulled into the list of files that make up
4162 po/POTFILES.in.
4163 * Makefile.in: Regenerate.
4164 * po/bfd.pot: Regenerate.
4165
4166 2001-02-06 H.J. Lu <hjl@gnu.org>
4167
4168 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4169 checking.
4170 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4171 external_PEI_IMAGE_hdr.
4172
4173 2001-02-06 Kazu Hirata <kazu@hxi.com>
4174
4175 * elf-m10200.c: Fix formatting.
4176
4177 2001-02-04 Nick Clifton <nickc@redhat.com>
4178
4179 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4180 rel, it will be handled later on.
4181
4182 2001-02-02 Fred Fish <fnf@ninemoons.com>
4183
4184 * Makefile.in: Fix typo.
4185
4186 2001-02-01 Kazu Hirata <kazu@hxi.com>
4187
4188 * elf-m10300.c: Fix formatting.
4189
4190 2001-01-30 Alan Modra <alan@linuxcare.com.au>
4191
4192 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4193 (elf_backend_get_symbol_type): Define.
4194 (elf64_hppa_object_p): Set architecture and machine from elf
4195 header flags.
4196
4197 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4198
4199 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4200 before mdebug.
4201
4202 2001-01-26 Richard Henderson <rth@redhat.com>
4203
4204 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4205 for non-default visibility.
4206 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4207 delete ugly macro and replace with pretty function.
4208
4209 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4210
4211 * coff-go32.c: Update copyright.
4212 * coff-stgo32.c: Likewise.
4213 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4214 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4215 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4216 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4217
4218 2001-01-25 Kazu Hirata <kazu@hxi.com>
4219
4220 * bfd-in2.h: Rebuild.
4221 * libbfd.h: Likewise.
4222
4223 2001-01-23 H.J. Lu <hjl@gnu.org>
4224
4225 * bfd-in2.h: Rebuild.
4226
4227 2001-01-23 H.J. Lu <hjl@gnu.org>
4228
4229 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4230 is NULL or PRIV(vms_rec) is outside of the buffer.
4231
4232 2001-01-23 Kazu Hirata <kazu@hxi.com>
4233
4234 * coff64-rs6000.c: Fix formatting.
4235 * coff-arm.c: Likewise.
4236 * coffgen.c: Likewise.
4237 * cofflink.c: Likewise.
4238 * coff-mcore.c: Likewise.
4239 * coff-mips.c: Likewise.
4240 * coff-pmac.c: Likewise.
4241 * coff-ppc.c: Likewise.
4242 * coff-rs6000.c: Likewise.
4243 * elf32.c: Likewise.
4244 * elf32-fr30.c: Likewise.
4245 * elf32-i370.c: Likewise.
4246 * elf32-i860.c: Likewise.
4247 * elf32-m32r.c: Likewise.
4248 * elf32-m68k.c: Likewise.
4249 * elf32-mcore.c: Likewise.
4250 * elf32-ppc.c: Likewise.
4251 * elf32-sh.c: Likewise.
4252 * elf32-v850.c: Likewise.
4253 * elf64-alpha.c: Likewise.
4254 * elf64-sparc.c: Likewise.
4255 * elflink.c: Likewise.
4256 * elflink.h: Likewise.
4257 * elf-m10200.c: Likewise.
4258 * elf-m10300.c: Likewise.
4259 * elfxx-ia64.c: Likewise.
4260
4261 * aoutx.h: Fix formatting.
4262 * bfd.c: Likewise.
4263 * bfd-in2.h: Likewise.
4264 * bfd-in.h: Likewise.
4265 * cpu-i386.c: Likewise.
4266 * cpu-m68hc11.c: Likewise.
4267 * dwarf2.c: Likewise.
4268 * elf64-x86-64.c: Likewise.
4269 * format.c: Likewise.
4270 * freebsd.h: Likewise.
4271 * hash.c: Likewise.
4272 * hp300hpux.c: Likewise.
4273 * hppabsd-core.c: Likewise.
4274 * hpux-core.c: Likewise.
4275
4276 2001-01-22 Bo Thorsen <bo@suse.de>
4277
4278 * elf64-x86-64.c: Added PIC support for X86-64.
4279 (elf64_x86_64_link_hash_newfunc): Function added.
4280 (elf64_x86_64_link_hash_table_create): Likewise.
4281 (elf64_x86_64_check_relocs): Likewise.
4282 (elf64_x86_64_gc_mark_hook): Likewise.
4283 (elf64_x86_64_gc_sweep_hook): Likewise.
4284 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4285 (elf64_x86_64_size_dynamic_sections): Likewise.
4286 (elf64_x86_64_discard_copies): Likewise.
4287 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4288 (elf64_x86_64_finish_dynamic_sections): Likewise.
4289 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4290
4291 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4292
4293 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4294 * Makefile.in: Regenerate.
4295
4296 2001-01-21 Kazu Hirata <kazu@hxi.com>
4297
4298 * coff-a29k.c: Fix formatting.
4299
4300 2001-01-19 H.J. Lu <hjl@gnu.org>
4301
4302 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4303 relocation section names.
4304 (elf_i386_relocate_section): Report files with bad relocation
4305 section names and return false.
4306
4307 2001-01-17 Bo Thorsen <bo@suse.de>
4308
4309 * targets.c: Alphabetize list of xvecs.
4310
4311 2001-01-14 Alan Modra <alan@linuxcare.com.au>
4312
4313 * config.bfd: Add linux target variant for elfxx-hppa.
4314 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4315 bfd_elf64_hppa_linux_vec.
4316 * configure: Regenerate.
4317 * elf64-hppa.c: Include elf64-target.h again to support linux
4318 target variant.
4319 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4320 * elf32-hppa.c: Include elf32-target.h again to support linux
4321 target variant.
4322 (elf32_hppa_post_process_headers): New function.
4323 (elf_backend_post_process_headers): Define.
4324 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4325 bfd_elf32_hppa_linux_vec.
4326
4327 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4328 and data_segment_base fields.
4329 (elf32_hppa_link_hash_table_create ): Init them.
4330 (elf32_hppa_check_relocs): Update comments.
4331 (hppa_record_segment_addr): New function.
4332 (elf32_hppa_relocate_section): Call it.
4333 (final_link_relocate): Handle R_PARISC_SEGREL32.
4334 (elf32_hppa_final_link): New function.
4335 (bfd_elf32_bfd_final_link): Define to call it.
4336 (hppa_unwind_entry_compare): New function.
4337 * cache.c (bfd_open_file): Create files in write+read mode.
4338
4339 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4340 SEGREL32 and numerous other relocs. Change duplicate
4341 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4342
4343 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4344 O_ACCMODE.
4345
4346 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4347 .plt entries for DT_INIT and DT_FINI.
4348 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4349 DT_INIT and DT_FINI.
4350
4351 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4352 offsets for stub .plt access if wide mode. Check offset in range.
4353
4354 2001-01-13 Nick Clifton <nickc@redhat.com>
4355
4356 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4357 line.
4358
4359 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4360 line.
4361
4362 2001-01-12 Alan Modra <alan@linuxcare.com.au>
4363
4364 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4365 * configure: Regenerate.
4366
4367 2001-01-11 Peter Targett <peter.targett@arccores.com>
4368
4369 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4370 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4371 * cpu-arc.c (arch_info_struct): Add entries for variants.
4372 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4373 (arc_get_mach) Don't assume machine names prefixed arc- before
4374 testing.
4375 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4376 selections.
4377 (arc_elf_final_write_processing) Likewise.
4378 (ELF_MACHINE_CODE) Use EM_ARC.
4379
4380 2001-01-10 Nick Clifton <nickc@redhat.com>
4381
4382 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4383
4384 2001-01-07 Philip Blundell <philb@gnu.org>
4385
4386 * README: Replace `bug-gnu-utils@gnu.org' with
4387 `bug-binutils@gnu.org'.
4388
4389 2001-01-04 Kazu Hirata <kazu@hxi.com>
4390
4391 * som.c: Fix formatting.
4392
4393 2001-01-03 Kazu Hirata <kazu@hxi.com>
4394
4395 * ecoffswap.h: Fix formatting.
4396 * elf-bfd.h: Likewise.
4397 * elfarm-nabi.c: Likewise.
4398 * elfarm-oabi.c: Likewise.
4399 * elfcode.h: Likewise.
4400 * elfcore.h: Likewise.
4401 * elflink.c: Likewise.
4402 * elflink.h: Likewise.
4403 * elfxx-ia64.c: Likewise.
4404 * elfxx-target.h: Likewise.
4405 * libbfd.c: Likewise
4406 * linker.c: Likewise.
4407 * lynx-core.c: Likewise.
4408
4409 2001-01-02 Kazu Hirata <kazu@hxi.com>
4410
4411 * pc532-mach.c: Fix formatting.
4412 * pe-arm.c: Likewise.
4413 * pe-i386.c: Likewise.
4414 * pe-mips.c: Likewise.
4415 * pe-ppc.c: Likewise.
4416 * pe-sh.c: Likewise.
4417 * pei-mips.c: Likewise.
4418 * pei-sh.c: Likewise.
4419 * peicode.h: Likewise.
4420 * ppcboot.c: Likewise.
4421 * ptrace-core.c: Likewise.
4422
4423 2001-01-01 Kazu Hirata <kazu@hxi.com>
4424
4425 * reloc.c: Fix formatting.
4426 * riscix.c: Likewise.
4427 * rs6000-core.c: Likewise.
4428 * xcoff-target.h: Likewise.
4429
4430 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4431
4432 * elfcode.h (elf_object_p): Also restore the bfd mach field on
4433 error, by calling bfd_default_set_arch_mach with incoming
4434 values.
4435
4436 2000-12-26 Kazu Hirata <kazu@hxi.com>
4437
4438 * vaxnetbsd.c: Fix formatting.
4439 * versados.c: Likewise.
4440 * vms-gsd.c: Likewise.
4441 * vms-hdr.c: Likewise.
4442 * vms-misc.c: Likewise.
4443
4444 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
4445
4446 * archive.c (coff_write_armap): Don't write more than symbol_count
4447 `archive_member_file_ptr's.
4448
4449 2000-12-25 Kazu Hirata <kazu@hxi.com>
4450
4451 * vms-tir.c: Fix formatting.
4452
4453 2000-12-23 Kazu Hirata <kazu@hxi.com>
4454
4455 * vms.c: Fix formatting.
4456 * vms.h: Likewise.
4457
4458 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
4459
4460 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
4461
4462 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
4463
4464 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
4465 arithmetic.
4466
4467 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
4468
4469 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
4470
4471 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
4472
4473 * libbfd.c (bfd_get_bits): Added
4474 (bfd_put_bits): Likewise
4475 * bfd-in.h: Declared the above.
4476 * bfd-in2.h: Regenerated.
4477
4478 2000-12-20 Kazu Hirata <kazu@hxi.com>
4479
4480 * targets.c: Fix formatting.
4481 * tekhex.c: Likewise.
4482 * trad-core.c: Likewise.
4483
4484 2000-12-19 Kazu Hirata <kazu@hxi.com>
4485
4486 * sco5-core.c: Fix formatting.
4487 * section.c: Likewise.
4488 * sparclinux.c: Likewise.
4489 * sparclynx.c: Likewise.
4490 * sparcnetbsd.c: Likewise.
4491 * srec.c: Likewise.
4492 * stabs.c: Likewise.
4493 * stab-syms.c: Likewise.
4494 * sunos.c: Likewise.
4495 * syms.c: Likewise.
4496 * sysdep.h: Likewise.
4497
4498 2000-12-18 Nick Clifton <nickc@redhat.com>
4499
4500 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
4501 defined.
4502 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
4503 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
4504
4505 2000-12-18 Nick Clifton <nickc@redhat.com>
4506
4507 * vms-misc.c (_bfd_vms_get_record): Add default case to
4508 file_format switch.
4509
4510 2000-12-15 Miloslav Trmac <mitr@volny.cz>
4511
4512 * elfcore.h (elf_core_file_p): Move to the start of the program
4513 headers before attempting to read them.
4514
4515 2000-12-14 Kazu Hirata <kazu@hxi.com>
4516
4517 * peigen.c: Fix formatting.
4518 * som.c: Likewise.
4519 * som.h: Likewise.
4520
4521 2000-12-13 Kazu Hirata <kazu@hxi.com>
4522
4523 * peigen.c: Fix formatting.
4524
4525 2000-12-12 Jim Wilson <wilson@redhat.com>
4526
4527 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
4528
4529 2000-12-08 Mark Salter <msalter@redhat.com>
4530
4531 * binary.c (binary_set_section_contents): Ignore sections
4532 with zero size.
4533
4534 2000-12-12 Kazu Hirata <kazu@hxi.com>
4535
4536 * m68klinux.c: Fix formatting.
4537 * m68knetbsd.c: Likewise.
4538 * mipsbsd.c: Likewise.
4539 * netbsd-core.c: Likewise.
4540 * netbsd.h: Likewise.
4541 * newsos3.c: Likewise.
4542 * nlm32-alpha.c: Likewise.
4543 * nlm32-i386.c: Likewise.
4544 * nlm32-ppc.c: Likewise.
4545 * nlm32-sparc.c: Likewise.
4546 * nlmcode.h: Likewise.
4547 * nlmswap.h: Likewise.
4548 * nlm-target.h: Likewise.
4549 * ns32knetbsd.c: Likewise.
4550
4551 2000-12-10 Fred Fish <fnf@be.com>
4552
4553 * elflink.h (elf_link_output_extsym): Don't complain about undefined
4554 symbols in shared objects if allow_shlib_undefined is true.
4555
4556 2000-12-12 Nick Clifton <nickc@redhat.com>
4557
4558 * cpu-sh.c: Fix formattng.
4559 * elf.c: Fix formattng.
4560 * elf32-mips.c: Fix formattng.
4561 * elf32-sh.c: Fix formattng.
4562 * elf64-alpha.c: Fix formattng.
4563
4564 2000-12-09 Nick Clifton <nickc@redhat.com>
4565
4566 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
4567 dwarf2_find_line_info as last parameter to invocation of
4568 _bfd_dwarf2_find_nearest_line.
4569 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
4570 dwarf2_find_line_info as last parameter to invocation of
4571 _bfd_dwarf2_find_nearest_line.
4572
4573 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
4574
4575 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
4576 (BFD_LIBS): ...to here.
4577 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
4578 (BFD_LIBS_CFILES): ...to here.
4579 * Makefile.in: Regenerate.
4580 * configure.in: Remove dwarf.lo from the elf shell variable.
4581 * configure: Regenerate.
4582 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
4583 * libcoff.h: Regenerate.
4584 * coffgen.c (coff_find_nearest_line): Call
4585 _bfd_dwarf2_find_nearest_line.
4586 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
4587 accordingly.
4588 (read_abbrevs): Likewise
4589 (decode_line_info): Likewise.
4590 (parse_comp_unit): Likewise.
4591 (comp_unit_find_nearest_line): Likewise.
4592 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
4593 * libbfd.h: Regenerate.
4594 * elf.c (_bfd_elf_find_nearest_line): Update call.
4595 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
4596 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
4597 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
4598 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
4599 (styp_to_sec_flags): Handle DWARF2 sections.
4600 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
4601 to _bfd_find_nearest_line.
4602 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
4603 call to _bfd_find_nearest_line.
4604
4605 2000-12-08 Kazu Hirata <kazu@hxi.com>
4606
4607 * coffgen.c: Fix formatting.
4608 * elf-m10300.c: Likewise.
4609 * elf32-i386.c: Likewise.
4610 * elf32-i960.c: Likewise.
4611 * elf32-m68k.c: Likewise.
4612 * elf32-mcore.c: Likewise.
4613 * elf32-ppc.c: Likewise.
4614 * elf32-sh.c: Likewise.
4615 * elf32-sparc.c: Likewise.
4616 * elf32-v850.c: Likewise.
4617 * elf64-alpha.c: Likewise.
4618 * elf64-hppa.c: Likewise.
4619 * elf64-mips.c: Likewise.
4620 * elf64-sparc.c: Likewise.
4621
4622 2000-12-07 Kazu Hirata <kazu@hxi.com>
4623
4624 * elf32-ppc.c: Fix formatting.
4625 * elf64-x86-64.c: Likewise.
4626
4627 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
4628
4629 From Ralf Baechle <ralf@gnu.org>
4630
4631 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
4632 BFDs containing no sections or empty .text, .data or .bss sections
4633 to be merged, regardless of their flags.
4634
4635 2000-12-06 Kazu Hirata <kazu@hxi.com>
4636
4637 * elf32-m32r.c: Fix formatting.
4638 * elf32-m68hc11.c: Likewise.
4639 * elf32-m68hc12.c: Likewise.
4640 * elf32-m68k.c: Likewise.
4641 * elf32-mcore.c: Likewise.
4642 * elf32-pj.c: Likewise.
4643 * elf32-ppc.c: Likewise.
4644
4645 2000-12-05 Kazu Hirata <kazu@hxi.com>
4646
4647 * elf32-fr30.c: Fix formatting.
4648 * elf32-hppa.c: Likewise.
4649 * elf32-i370.c: Likewise.
4650 * elf32-i386.c: Likewise.
4651 * elf32-i860.c: Likewise.
4652 * elf32-i960.c: Likewise.
4653
4654 2000-12-03 Kazu Hirata <kazu@hxi.com>
4655
4656 * elf32-arm.h: Fix formatting.
4657 * elf32-avr.c: Likewise.
4658 * elf32-cris.c: Likewise.
4659 * elf32-d10v.c: Likewise.
4660 * elf32-d30v.c: Likewise.
4661 * elf-hppa.h: Likewise.
4662 * elf-m10200.c: Likewise.
4663 * elf-m10300.c: Likewise.
4664
4665 2000-12-01 Chris Demetriou <cgd@sibyte.com>
4666
4667 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
4668 bfd_mach_mips32_4k. Update FIXME comment.
4669 * archures.c (bfd_mach_mips32): New constant.
4670 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4671 the latter, renumber it.
4672 * bfd-in2.h (bfd_mach_mips32): New constant.
4673 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4674 the latter, renumber it.
4675 * cpu-mips.c (I_mips32): New constant.
4676 (I_mips4K, I_mips32_4k): Rename the former to the latter.
4677 (arch_info_struct): Add bfd_mach_mips32 entry, replace
4678 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
4679 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
4680 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
4681 with E_MIPS_MACH_MIPS32_4K.
4682 (_bfd_mips_elf_final_write_processing): Replace
4683 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
4684 bfd_mach_mips32 case.
4685 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
4686 comparison with support for MIPS32.
4687 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
4688 MIPS32.
4689
4690 * aoutx.h (NAME(aout,machine_type)): Add cases for
4691 bfd_mach_mips5 and bfd_mach_mips64.
4692 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
4693 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
4694 * cpu_mips.c (I_mips5, I_mips64): New definitions.
4695 (arch_info_struct): Add entries for bfd_mach_mips5 and
4696 bfd_mach_mips64.
4697 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
4698 _bfd_mips_elf_print_private_bfd_data): Add cases for
4699 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
4700 (_bfd_mips_elf_final_write_processing): Add cases for
4701 bfd_mach_mips5 and bfd_mach_mips64.
4702
4703 * aoutx.h (NAME(aout,machine_type)): Add a
4704 bfd_mach_mips_sb1 case.
4705 * archures.c (bfd_mach_mips_sb1): New constant.
4706 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
4707 * cpu-mips.c (I_sb1): New constant.
4708 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
4709 * elf32-mips.c (elf_mips_mach): Add case for
4710 E_MIPS_MACH_SB1.
4711 (_bfd_mips_elf_final_write_processing): Add case for
4712 bfd_mach_mips_sb1.
4713
4714 2000-12-01 Joel Sherrill <joel@OARcorp.com>
4715
4716 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
4717 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
4718 (sparc*-*-rtems*): Switched from a.out to ELF.
4719
4720 2000-11-30 Jan Hubicka <jh@suse.cz>
4721
4722 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
4723 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
4724 (elf64-x86-64.lo): Add dependencies.
4725 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
4726 bfd_mach_x86_64_intel_syntax.
4727 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
4728 * config.bfd (x86_64): Add.
4729 * configure.in: Add support for bfd_elf64_x86_64_vec.
4730 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
4731 (bfd_i386_arch, i8086_ar): Link in.
4732 * elf64-x86-64.c: New file.
4733 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
4734 * targets.c (bfd_elf64_x86_64_vec): Add.
4735 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
4736
4737 2000-11-30 Kazu Hirata <kazu@hxi.com>
4738
4739 * xcofflink.c: Fix formatting.
4740
4741 2000-11-28 Kazu Hirata <kazu@hxi.com>
4742
4743 * aoutx.h: Fix formatting.
4744 * bfd-in.h: Likewise.
4745 * bfd-in2.h: Likewise.
4746 * cache.c: Likewise.
4747 * cisco-core.c: Likewise.
4748 * coff64-rs6000.c: Likewise.
4749 * coffcode.h: Likewise.
4750 * coffswap.h: Likewise.
4751 * corefile.c: Likewise.
4752 * elf32-mips.c: Likewise.
4753
4754 2000-11-27 Kazu Hirata <kazu@hxi.com>
4755
4756 * aout-adobe.c: Fix formatting.
4757 * coff64-rs6000.c: Likewise.
4758 * coffgen.c: Likewise.
4759 * cofflink.c: Likewise.
4760
4761 2000-11-27 Philip Blundell <pb@futuretv.com>
4762
4763 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
4764 (obj_coff_strings_written): New accessor macro for above.
4765 * libcoff.h: Regenerate.
4766 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
4767 strings.
4768 * coffcode.h (coff_write_object_contents): No need to write out
4769 the string table if it's already been done.
4770
4771 2000-11-22 Philip Blundell <pb@futuretv.com>
4772
4773 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
4774 weak undefined symbols.
4775
4776 2000-11-24 Nick Clifton <nickc@redhat.com>
4777
4778 * archures.c (bfd_mach_arm_5TE): Define.
4779 (bfd_mach_arm+XScale): Define.
4780 * bfd-in2.h: Regenerate.
4781
4782 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
4783 BFD_RELOC_ARM_PCREL_BLX.
4784
4785 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
4786 XScale machine numbers.
4787
4788 * config.bfd (xscale-elf): Add target.
4789 (xscale-coff): Add target.
4790
4791 * cpu-arm.c: Add xscale machine name.
4792 Add v5t, v5te and XScale machine numbers.
4793
4794 2000-11-23 Kazu Hirata <kazu@hxi.com>
4795
4796 * aix386-core.c: Fix formatting.
4797
4798 2000-11-22 Jim Wilson <wilson@redhat.com>
4799
4800 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
4801 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
4802 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
4803 (ins_imms_scaled): Initialize sign_bit at function entry.
4804 (elf64_ia64_operands): Add missing initializers.
4805 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
4806 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
4807 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
4808 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
4809 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
4810 parameters.
4811 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
4812 and free_extsyms at function entry.
4813 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
4814 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
4815 (get_got): Delete unused local srel.
4816 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
4817 (elfNN_ia64_relocate_section): Delete unused local dynindx.
4818
4819 2000-11-21 Kazu Hirata <kazu@hxi.com>
4820
4821 * coff-a29k.c: Fix formatting.
4822 * coff-h8500.c: Likewise.
4823 * coff-i960.c: Likewise.
4824 * coff-ppc.c: Likewise.
4825 * coff-rs6000.c: Likewise.
4826 * coff-stgo32.c: Likewise.
4827 * coff-tic54x.c: Likewise.
4828 * coff-w65.c: Likewise.
4829 * cpu-h8500.c: Likewise.
4830 * cpu-hppa.c: Likewise.
4831 * cpu-ns32k.c: Likewise.
4832 * ecoff.c: Likewise.
4833 * ecofflink.c: Likewise.
4834
4835 2000-11-21 Nick Clifton <nickc@redhat.com>
4836
4837 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
4838 remove possibility of infinite loop.
4839
4840 2000-11-20 Kazu Hirata <kazu@hxi.com>
4841
4842 * aix386-core.c: Fix formatting.
4843 * aout-adobe.c: Likewise.
4844 * aout-arm.c: Likewise.
4845 * aout-encap.c: Likewise.
4846 * aout-ns32k.c: Likewise.
4847 * aout-target.h: Likewise.
4848 * aout-tic30.c: Likewise.
4849 * aoutf1.h: Likewise.
4850 * aoutx.h: Likewise.
4851 * archive.c: Likewise.
4852 * bfd-in.h: Likewise.
4853 * bfd-in2.h: Likewise.
4854 * bfd.c: Likewise.
4855 * bout.c: Likewise.
4856
4857 2000-11-17 H.J. Lu <hjl@gnu.org>
4858
4859 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
4860 pltoff entries for DT_INIT and DT_FINI.
4861 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
4862 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
4863 entries.
4864
4865 2000-11-16 Richard Henderson <rth@redhat.com>
4866
4867 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
4868 (allocate_dynrel_entries): Likewise.
4869 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
4870 (set_pltoff_entry): Likewise.
4871 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
4872 (elfNN_ia64_reloc_type_lookup): Likewise.
4873 (elfNN_ia64_install_value): Likewise.
4874 (elfNN_ia64_relocate_section): Likewise.
4875 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
4876 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
4877
4878 2000-11-16 Kazu Hirata <kazu@hxi.com>
4879
4880 * cpu-a29k.c: Fix formatting.
4881 * cpu-alpha.c: Likewise.
4882 * cpu-arm.c: Likewise.
4883 * cpu-avr.c: Likewise.
4884 * cpu-d10v.c: Likewise.
4885 * cpu-h8500.c: Likewise.
4886 * cpu-hppa.c: Likewise.
4887 * cpu-i370.c: Likewise.
4888 * cpu-i386.c: Likewise.
4889 * cpu-i960.c: Likewise.
4890 * cpu-ia64-opc.c: Likewise.
4891 * cpu-ia64.c: Likewise.
4892 * cpu-m32r.c: Likewise.
4893 * cpu-m68hc11.c: Likewise.
4894 * cpu-m68hc12.c: Likewise.
4895 * cpu-m68k.c: Likewise.
4896 * cpu-m88k.c: Likewise.
4897 * cpu-mips.c: Likewise.
4898 * cpu-ns32k.c: Likewise.
4899 * cpu-pj.c: Likewise.
4900 * cpu-powerpc.c: Likewise.
4901 * cpu-sh.c: Likewise.
4902 * cpu-sparc.c: Likewise.
4903 * cpu-tic54x.c: Likewise.
4904 * cpu-v850.c: Likewise.
4905 * cpu-vax.c: Likewise.
4906 * cpu-w65.c: Likewise.
4907 * cpu-we32k.c: Likewise.
4908 * cpu-z8k.c: Likewise.
4909 * dwarf1.c: Likewise.
4910 * dwarf2.c: Likewise.
4911
4912 2000-11-15 Kazu Hirata <kazu@hxi.com>
4913
4914 * coff-arm.c: Fix formatting.
4915 * coff-ppc.c: Likewise.
4916 * coff-rs6000.c: Likewise.
4917 * coff-sh.c: Likewise.
4918 * coff-sparc.c: Likewise.
4919 * coff-tic30.c: Likewise.
4920 * coff-tic54x.c: Likewise.
4921 * coff-tic80.c: Likewise.
4922 * coff-w65.c: Likewise.
4923 * coff-we32k.c: Likewise.
4924 * coff-z8k.c: Likewise.
4925
4926 2000-11-15 Richard Henderson <rth@redhat.com>
4927
4928 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
4929 section with the same ALLOC|LOAD flags as the source section.
4930
4931 2000-11-14 Jakub Jelinek <jakub@redhat.com>
4932
4933 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
4934 by STO_ALPHA constants.
4935
4936 2000-11-14 Kazu Hirata <kazu@hxi.com>
4937
4938 * coff-pmac.c: Fix formatting.
4939 * coff-ppc.c: Likewise.
4940
4941 2000-11-13 H.J. Lu <hjl@gnu.org>
4942
4943 * elflink.h (elf_link_add_object_symbols): Also add indirect
4944 symbols for common symbols with the default version.
4945
4946 2000-11-09 Philip Blundell <pb@futuretv.com>
4947
4948 * section.c (STD_SECTION): Set gc_mark flag.
4949
4950 2000-11-11 Kazu Hirata <kazu@hxi.com>
4951
4952 * coff-i960.c: Likewise.
4953 * coff-m68k.c: Likewise.
4954 * coff-m88k.c: Likewise.
4955 * coff-mcore.c: Likewise.
4956 * coff-mips.c: Likewise.
4957
4958 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
4959
4960 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
4961
4962 2000-11-10 Kazu Hirata <kazu@hxi.com>
4963
4964 * coff-h8300.c: Fix formatting.
4965 * coff-h8500.c: Likewise.
4966 * coff-i386.c: Likewise.
4967 * coff-i860.c: Likewise.
4968 * coff-i960.c: Likewise.
4969 * coff-ia64.c: Likewise.
4970
4971 2000-11-09 Kazu Hirata <kazu@hxi.com>
4972
4973 * archive.c: Fix formatting.
4974 * archures.c: Likewise.
4975
4976 2000-11-07 Richard Henderson <rth@redhat.com>
4977
4978 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
4979 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
4980 * section.c (bfd_set_section_contents): Call memcpy if
4981 section->contents set and location not equal to contents plus offset.
4982
4983 2000-11-08 Kazu Hirata <kazu@hxi.com>
4984
4985 * bfd-in.h: Fix formatting.
4986 * bfd-in2.h: Likewise.
4987 * bfd.c: Likewise.
4988 * binary.c: Likewise.
4989 * bout.c: Likewise.
4990 * coff-a29k.c: Likewise.
4991 * coff-alpha.c: Likewise.
4992 * coff-apollo.c: Likewise.
4993 * coff-aux.c: Likewise.
4994
4995 2000-11-07 Kazu Hirata <kazu@hxi.com>
4996
4997 * aix386-core.c: Fix formatting.
4998 * aoutf1.h: Likewise.
4999 * aoutx.h: Likewise.
5000 * archures.c: Likewise.
5001 * armnetbsd.c: Likewise.
5002
5003 2000-11-07 Alan Modra <alan@linuxcare.com.au>
5004
5005 * coff-h8300.c (special): Adjust reloc address.
5006
5007 2000-11-06 Steve Ellcey <sje@cup.hp.com>
5008
5009 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
5010 to differentiate elf32 and elf64 on ia64.
5011 * bfd-in2.h: Regenerate.
5012 * config.bfd: Add target for "ia64*-*-hpux*".
5013 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
5014 * configure: Regenerate.
5015 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
5016 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
5017
5018 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
5019 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
5020 * Makefile.in: Regnerate.
5021 * elf64-ia64.c: Deleted.
5022 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
5023
5024 2000-11-06 Kazu Hirata <kazu@hxi.com>
5025
5026 * aout-adobe.c: Fix formatting.
5027 * aout-arm.c: Likewise.
5028 * aout-cris.c: Likewise.
5029 * aout-encap.c: Likewise.
5030 * aout-ns32k.c: Likewise.
5031 * aout-target.h: Likewise.
5032 * aout-tic30.c: Likewise.
5033
5034 2000-11-05 Philip Blundell <philb@gnu.org>
5035
5036 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
5037 BFDs containing no sections to be merged, regardless of their flags.
5038
5039 2000-11-04 Philip Blundell <philb@gnu.org>
5040
5041 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
5042 if a relocation for an undefined symbol also results in an
5043 overflow.
5044
5045 2000-11-06 Christopher Faylor <cgf@cygnus.com>
5046
5047 * config.bfd: Add support for Sun Chorus.
5048
5049 2000-11-05 David O'Brien <obrien@FreeBSD.org>
5050
5051 * configure.in: Recognize alpha-*-freebsd*.
5052 * configure: Regenerate.
5053
5054 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
5055
5056 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
5057 (Chunk): New global variable set by a parameter in objcopy.c.
5058 (S3Forced): New global variable set by a parameter in
5059 objcopy.c.
5060 (srec_set_section_contents): If S3Forced is true, always generate
5061 S3 records.
5062 (srec_write_section): Use 'Chunk' to limit maximum length of S
5063 records.
5064
5065 2000-11-02 Per Lundberg <plundis@chaosdev.org>
5066
5067 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
5068 * Makefile.in: Regenerate.
5069 * bfd-in2.h: Regenerate.
5070 * po/bfd.pot: Regenerate.
5071
5072 2000-10-31 Philip Blundell <philb@gnu.org>
5073
5074 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
5075 EF_SOFT_FLOAT if it is defined.
5076
5077 2000-10-27 Philip Blundell <philb@gnu.org>
5078
5079 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
5080 attempts to mix PIC code with non-PIC, just mark the output as
5081 being position dependent.
5082 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
5083 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
5084 all mismatches, not just the first one.
5085
5086 2000-10-25 Chris Demetriou <cgd@sibyte.com>
5087
5088 * ieee.c (ieee_archive_p): Plug one of many possible
5089 memory leaks in error handling.
5090
5091 2000-10-20 Jakub Jelinek <jakub@redhat.com>
5092
5093 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5094 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5095 Support v8plusb.
5096 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5097 sparc64_elf_object_p): Support v9b.
5098 * archures.c: Declare v8plusb and v9b machines.
5099 * bfd-in2.h: Ditto.
5100 * cpu-sparc.c: Ditto.
5101
5102 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5103
5104 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5105 of a GOT reloc.
5106
5107 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5108 (SYMBOL_CALLS_LOCAL): New macro.
5109 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5110 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5111 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5112 (ppc_elf_relocate_section): Use flag variable to determine
5113 whether the relocation refers to a local symbol.
5114 Test whether a PLTREL24 reloc will produce a reloc by looking
5115 to see whether a PLT entry was made.
5116
5117 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5118
5119 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5120 entries that could serve as a definition for a weak symbol.
5121
5122 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5123
5124 From Ralf Baechle <ralf@gnu.org>
5125
5126 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5127 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5128 against local symbols.
5129 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5130
5131 2000-10-12 Alan Modra <alan@linuxcare.com.au>
5132
5133 * section.c (struct sec): Add kept_section.
5134 (struct bfd_comdat_info): Remove sec, we can use above.
5135 (STD_SECTION): Add initializer.
5136 (bfd_make_section_anyway): Init here too.
5137
5138 * bfd-in2.h: Regenerate.
5139
5140 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5141 zeroing of `flags'.
5142 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5143 fudge values for discarded link-once section symbols.
5144
5145 * elf64-hppa.c: Include alloca-conf.h
5146
5147 2000-10-11 Alan Modra <alan@linuxcare.com.au>
5148
5149 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5150
5151 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5152
5153 2000-10-10 Alan Modra <alan@linuxcare.com.au>
5154
5155 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5156
5157 2000-10-10 Tom Rix <trix@redhat.com>
5158
5159 * section.c (bfd_make_section_anyway): Release newsect ptr when
5160 newsect->symbol fails to alloc. Use bfd_release instead of free.
5161
5162 2000-10-09 Richard Henderson <rth@cygnus.com
5163
5164 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5165 (elf64_ia64_unwind_entry_compare): New.
5166 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5167
5168 2000-10-07 Alan Modra <alan@linuxcare.com.au>
5169
5170 * elflink.h (size_dynamic_sections): Don't create various tags if
5171 .dynstr is excluded from the link. Don't set first dynsym entry
5172 if dynsymcount is zero.
5173 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5174 .dynsym excluded from the link. Don't try to write any dynamic
5175 sections excluded from the link.
5176
5177 * elf.c (swap_out_syms): Handle global section symbols.
5178
5179 2000-10-05 DJ Delorie <dj@redhat.com>
5180
5181 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5182 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5183 (coff_write_relocs): write extended reloc count
5184 (coff_write_object_contents): account for extended relocs
5185
5186 2000-10-05 Jim Wilson <wilson@cygnus.com>
5187
5188 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5189 field.
5190 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5191 elf_backend_section_flags function.
5192 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5193 code.
5194 (elf64_ia64_section_flags): New function containing flag conversion
5195 code.
5196 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5197 * elfxx-target.h (elf_backend_section_flags): Define.
5198 (elfNN_bed): Initialize elf_backend_section_flags field.
5199
5200 2000-10-02 Alan Modra <alan@linuxcare.com.au>
5201
5202 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5203 _bfd_elf32_gc_record_vtable. Correct a comment.
5204
5205 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5206
5207 From Ralf Baechle <ralf@gnu.org>
5208
5209 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5210 produces binaries with got[1] = 0x80000001 to differenciate them
5211 for the dynamic linker from the broken binaries produced by old
5212 versions.
5213
5214 2000-09-30 Petr Sorfa <petrs@sco.com>
5215
5216 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5217 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5218 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5219 * configure: Regenerate.
5220
5221 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
5222
5223 Define two bfd_targets for absence and presence of leading
5224 underscore on symbols. Make sure to only link same kind.
5225 * elf32-cris.c (cris_elf_object_p,
5226 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5227 cris_elf_merge_private_bfd_data): New.
5228 (elf_backend_object_p, elf_backend_final_write_processing,
5229 bfd_elf32_bfd_print_private_bfd_data,
5230 bfd_elf32_bfd_merge_private_bfd_data): Define.
5231 <Target vector definition>: Include elf32-target.h twice with
5232 different macro settings:
5233 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5234 bfd_elf32_us_cris_vec.
5235 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5236 (elf_symbol_leading_char): First as 0, then '_'.
5237 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5238 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5239 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5240 * configure: Regenerate.
5241 * targets.c: Declare bfd_elf32_us_cris_vec.
5242 * po/bfd.pot: Regenerate.
5243
5244 2000-09-29 Momchil Velikov <velco@fadata.bg>
5245
5246 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5247 R_ARM_THM_PC22 relocations.
5248
5249 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5250
5251 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5252
5253 2000-09-29 Momchil Velikov <velco@fadata.bg>
5254
5255 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5256 is has the SEC_HAS_CONTENTS flag set.
5257
5258 2000-09-28 \81Örjan Friberg <orjanf@axis.com>
5259 Hans-Peter Nilsson <hp@axis.com>
5260
5261 * aout-cris.c (N_TXTADDR): Define.
5262
5263 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
5264
5265 * som.c: Include alloca-conf.h.
5266 * Makefile.am: "make dep-am"
5267 * Makefile.in: Regenerate.
5268
5269 2000-09-27 Alan Modra <alan@linuxcare.com.au>
5270
5271 * elf32-hppa.c (plt_stub): New.
5272 (PLT_STUB_ENTRY): Define.
5273 (elf32_hppa_link_hash_table): Change multi_subspace to packed
5274 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
5275 (elf32_hppa_link_hash_table_create): Init to suit.
5276 (elf32_hppa_check_relocs): Set has_12bit_branch and
5277 has_17bit_branch as appropriate.
5278 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
5279 non-local functions.
5280 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
5281 Add space for plt_stub as needed.
5282 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
5283 functions at plt_stub.
5284 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
5285 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
5286
5287 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
5288 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
5289 of fixed size, and if negative, disable handling of input sections
5290 before stub section. Set up default stub group size depending
5291 on detected branch relocs.
5292 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
5293 ensure different offsets from sym_value aren't rounded to
5294 different 2k blocks. Use lrsel and rrsel for other stubs too for
5295 consistency rather than necessity.
5296 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
5297 (final_link_relocate): Likewise.
5298 (elf32_hppa_relocate_section): Likewise.
5299
5300 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
5301 (_bfd_elf_hppa_gen_reloc_type): Generate them.
5302 (elf_hppa_final_link_relocate): Handle them.
5303 (elf_hppa_relocate_insn): Likewise.
5304 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
5305
5306 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
5307
5308 * elfcode.h (elf_object_p): Preserve and clear abfd section
5309 information. Restore at error.
5310
5311 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
5312
5313 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
5314 is empty, make sure that its rva also 0. NT loader dislikes
5315 having otherwise.
5316
5317 2000-09-26 Steve Ellcey <sje@cup.hp.com>
5318
5319 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
5320 global by default.
5321
5322 2000-09-21 Alan Modra <alan@linuxcare.com.au>
5323
5324 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
5325 currently unused RELATIVE_DYNAMIC_RELOCS code.
5326 (hppa_discard_copies): Likewise.
5327 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
5328 comments. Don't check non-code output sections for stub grouping.
5329
5330 2000-09-20 Alan Modra <alan@linuxcare.com.au>
5331
5332 * section.c (bfd_get_unique_section_name): Return NULL if
5333 bfd_malloc fails.
5334
5335 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5336
5337 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
5338 instruction sequence to actually work.
5339 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
5340 accordingly.
5341
5342 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
5343
5344 * elf32-sh.c (sh_elf_relocate_section): Use
5345 _bfd_final_link_relocate to apply the relocation against a section
5346 symbol, when doing relocatable links.
5347
5348 2000-09-18 Alan Modra <alan@linuxcare.com.au>
5349
5350 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
5351 to id_sec.
5352 (stub_hash_newfunc): Here too.
5353 (hppa_add_stub): And here.
5354 (elf32_hppa_link_hash_table): Remove stub_section_created,
5355 reloc_section_created, first_init_sec and first_fini_sec. Add
5356 stub_group.
5357 (elf32_hppa_link_hash_table_create): Init to suit.
5358 (hppa_get_stub_entry): Add support for grouping stub sections.
5359 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
5360 section code. Index stub vars by section->id.
5361 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
5362 exit paths. Zap allocation of above removed vars. Refine
5363 link-once test.
5364
5365 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
5366 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5367 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
5368 rather than pointer to bfd_link_info.
5369 (hppa_add_stub): Likewise.
5370 (final_link_relocate): Likewise.
5371
5372 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
5373
5374 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
5375 link-once sections.
5376
5377 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
5378
5379 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
5380 ld/emulparams/shelf.sh.
5381
5382 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5383
5384 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
5385 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
5386 * bfd-in2.h: Regenerate.
5387
5388 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
5389
5390 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
5391 LITUSE relocations incorrectly if -relax is specified on the ld
5392 command line and the displacement field of the load or store
5393 instruction is non-zero. (Patch by paul.winalski@compaq.com)
5394
5395 2000-09-15 Alan Modra <alan@linuxcare.com.au>
5396
5397 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
5398 first_fini_sec here.
5399 (elf32_hppa_size_stubs): Instead correctly find the first .init
5400 and .fini section here.
5401
5402 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
5403
5404 * elf32-hppa.c (clobber_millicode_symbols): New function.
5405 (elf32_hppa_size_dynamic_sections): Call it.
5406
5407 2000-09-14 Alan Modra <alan@linuxcare.com.au>
5408
5409 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
5410 packed. Add plabel, plt_abs packed booleans.
5411 (hppa_link_hash_newfunc): Init new fields.
5412 (PLABEL_PLT_ENTRY_SIZE): Define.
5413 (hppa_stub_name): Use size_t len vars.
5414 (hppa_add_stub): Likewise.
5415 (elf32_hppa_build_stubs): Likewise.
5416 (hppa_build_one_stub): Kill some compiler warnings.
5417 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
5418 if dynamic linking. Munge the local plt offsets into
5419 local_got_refcounts. Set h->plabel for all global PLABELs. Use
5420 size_t len vars. Add assert for plabel addend.
5421 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
5422 (elf32_hppa_hide_symbol): New function.
5423 (elf_backend_hide_symbol): Define.
5424 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
5425 with h->plabel set. Don't make plt entries to have dynamic syms
5426 when they have been forced local. If plt entry is used by a
5427 plabel, make it PLABEL_PLT_ENTRY_SIZE.
5428 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
5429 Set up .plt offsets for local syms.
5430 (elf32_hppa_relocate_section): Initialise plt entries for local
5431 syms. Leave weak undefined plabels zero. Make global plabel
5432 relocs against function symbol, and leave the addend zero.
5433 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
5434 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
5435 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
5436 relocs instead of SEGREL32 for dynamic got relocs.
5437 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
5438 (elf_backend_got_header_size): Adjust.
5439 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
5440
5441 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
5442 (hppa_type_of_stub): Use it instead of #if 0
5443 (hppa_discard_copies): Use it here too.
5444 (elf32_hppa_size_dynamic_sections): And here.
5445
5446 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
5447 (elf32_hppa_link_hash_table_create): And here.
5448 (hppa_build_one_stub): And here. Instead keep track of stub
5449 offset using _raw_size.
5450 (elf32_hppa_size_stubs): Likewise.
5451 (elf32_hppa_build_stubs): Likewise.
5452 (hppa_size_one_stub): Likewise. Resize reloc section too.
5453
5454 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
5455 first_fini_sec handling. Don't search for reloc section or set
5456 hplink->reloc_section_created here.
5457 (elf32_hppa_size_stubs): Instead search for reloc sections, and
5458 set reloc_section_created here.
5459 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
5460 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
5461 and DT_FINI.
5462 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
5463
5464 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
5465 with `hplink->root.'.
5466 (elf32_hppa_check_relocs): Likewise.
5467 (elf32_hppa_gc_sweep_hook): Likewise.
5468 (elf32_hppa_adjust_dynamic_symbol): Likewise.
5469 (hppa_handle_PIC_calls): Likewise.
5470 (elf32_hppa_size_dynamic_sections): Likewise.
5471 (elf32_hppa_set_gp): Likewise.
5472 (elf32_hppa_relocate_section): Likewise.
5473 (elf32_hppa_finish_dynamic_symbol): Likewise.
5474 (elf32_hppa_finish_dynamic_sections): Likewise.
5475
5476 From David Huggins-Daines <dhd@linuxcare.com>
5477 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
5478 defined weak symbols in shared links.
5479 (final_link_relocate): Calls to defined weak symbols in shared
5480 objects must go via import stubs, as the target might not be known
5481 at link time.
5482
5483 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
5484
5485 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
5486 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
5487 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
5488 the original entries with EMPTY_HOWTOs, and added new ones to fill
5489 in the gap.
5490 (sh_elf_info_to_howto): Make sure the new gap isn't used.
5491 (sh_elf_relocate_section): Likewise.
5492
5493 2000-09-13 Anders Norlander <anorland@acc.umu.se>
5494
5495 * cpu-mips.c (arch_info_struct): Add mips:4K
5496 * bfd-in2.h (bfd_mach_mips4K): New define.
5497 * archures.c: Add bfd_mach_mips4K to comment.
5498 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
5499 E_MIPS_ARCH_2 for bfd_mach_mips4K.
5500
5501 2000-09-13 Marco Franzen <marcof@thyron.com>
5502
5503 * som.c (som_write_symbol_strings): Do not used fixed buffers,
5504 use size_t as a counter.
5505 (som_write_space_strings): Similarly.
5506
5507 2000-09-12 Jason Eckhardt <jle@cygnus.com>
5508
5509 * elf32-i860.c (elf32_i860_relocate_pc26): New function
5510 and prototype.
5511 (elf32_i860_relocate_section): Invoke new function from here.
5512
5513 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5514
5515 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
5516 static.
5517
5518 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5519
5520 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
5521 target section name instead of dumping core when the target symbol is
5522 undefined.
5523
5524 2000-09-09 Kazu Hirata <kazu@hxi.com>
5525
5526 * riscix.c: Remove DEFUN.
5527
5528 2000-09-08 Nick Clifton <nickc@redhat.com>
5529
5530 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
5531 initialise flags in output bfd if the input bfd is the default
5532 architecture with the default flags.
5533
5534 2000-09-08 Kazu Hirata <kazu@hxi.com>
5535
5536 * archive.c: Fix formatting.
5537 * coff-arm.c: Likewise.
5538 * doc/chew.c: Likewise.
5539
5540 2000-09-08 Alan Modra <alan@linuxcare.com.au>
5541
5542 * section.c (bfd_get_unique_section_name): Put a dot before the
5543 numeric suffix.
5544
5545 2000-09-07 Kazu Hirata <kazu@hxi.com>
5546
5547 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
5548 * elf.c: Fix formatting.
5549
5550 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
5551
5552 * config.bfd (sh-*-linux*): Added.
5553 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
5554 * targets.c: Declare them.
5555 * elf32-sh-lin.c: New file.
5556 * Makefile.am: Compile it.
5557 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
5558 * configure, Makefile.in: Rebuilt.
5559
5560 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
5561
5562 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
5563 pseduo-section when determining where the TOC ends.
5564
5565 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
5566 output x_tvndx as it is only two bytes wide.
5567
5568 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
5569 reloc is 26 or 32 bits wide.
5570
5571 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
5572 for relocs that don't change anything. Also look at the full
5573 6 bits of bitsize.
5574
5575 2000-09-06 Philip Blundell <philb@gnu.org>
5576
5577 * config.bfd (arm*-*-uclinux*): New target.
5578
5579 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
5580
5581 * configure: Rebuilt with new libtool.m4.
5582
5583 2000-09-06 Alan Modra <alan@linuxcare.com.au>
5584
5585 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
5586 word for variable name.
5587 * bfd-in2.h: Regenerate.
5588
5589 2000-09-05 Nick Clifton <nickc@redhat.com>
5590
5591 * config.in: Regenerate.
5592 * libbfd.h: Regenerate.
5593 * po/bfd.pot: Regenerate.
5594 * doc/bfdint.texi: Remove CVS date string - it foils compares with
5595 local versions.
5596
5597 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
5598
5599 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
5600
5601 2000-09-05 Alan Modra <alan@linuxcare.com.au>
5602
5603 Shared library and PIC support.
5604 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
5605 (GOT_ENTRY_SIZE): New.
5606 (ELF_DYNAMIC_INTERPRETER): New.
5607 (STUB_SUFFIX): Define.
5608 (LONG_BRANCH_PIC_IN_SHLIB): Define.
5609 (RELATIVE_DYNAMIC_RELOCS): Define.
5610 (enum elf32_hppa_stub_type): New.
5611 (struct elf32_hppa_stub_hash_entry): Rename offset to
5612 stub_offset. Add a number of new fields.
5613 (struct elf32_hppa_link_hash_entry): New.
5614 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
5615 global_value.
5616 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
5617 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
5618 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
5619 new fields.
5620 (hppa_link_hash_newfunc): New function.
5621 (elf32_hppa_link_hash_table_create): Use above function. Init new
5622 fields.
5623 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
5624 instead of addend, and remove sym_name from args. Don't use
5625 symbol name for local syms, instead use sym index.
5626 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
5627 stub type rather than size. Pass in hash and handle import stub
5628 case. Also pass in reloc instead of offset so we can calculate
5629 PCREL22F and PCREL12F branches properly.
5630 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
5631 import and export stubs too.
5632 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
5633 import and export stub sizing.
5634 (elf32_hppa_check_relocs): New function.
5635 (elf32_hppa_adjust_dynamic_symbol): New function.
5636 (hppa_discard_copies): New function.
5637 (elf32_hppa_size_dynamic_sections): New function.
5638 (elf_backend_size_dynamic_sections): Define.
5639 (elf32_hppa_finish_dynamic_symbol): New function.
5640 (elf_backend_finish_dynamic_symbol): Define.
5641 (elf32_hppa_size_stubs): Stash params in link hash table, and move
5642 some local vars into the link hash table too. For shared links,
5643 trundle over function syms, generating export stubs. Handle
5644 PCREL22F branches. Break out stub creation code from here..
5645 (hppa_add_stub): .. to here. New function.
5646 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
5647 call the bfd linker. Use elf_gp to record global pointer.
5648 Calculate a value from sections if $global$ is missing.
5649 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
5650 (elf32_hppa_gc_mark_hook): New function.
5651 (elf_backend_gc_mark_hook): Define.
5652 (elf32_hppa_gc_sweep_hook): New function.
5653 (elf_backend_gc_sweep_hook): Define.
5654 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
5655 Add rel to args, and remove howto, input_bfd, offset, addend,
5656 sym_name as we can recalculate these locally. Handle calls to
5657 dynamic objects, extra PIC relocs, PCREL22F branches. Change
5658 handling of undefined weak syms. Check that stubs are in range.
5659 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
5660 message on hitting a DPREL21L reloc that needs fixing. Subtract
5661 off PC for PCREL14F. Break out code that does a stub lookup from
5662 here..
5663 (hppa_get_stub_entry): ..to here. New function.
5664 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
5665 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
5666 relocs, etc. etc.
5667 (elf32_hppa_finish_dynamic_sections): New function.
5668 (elf_backend_finish_dynamic_sections): Define.
5669 (elf_backend_final_write_processing) Define.
5670 (hppa_handle_PIC_calls): New function.
5671 (elf32_hppa_build_stubs): Call it. Pass link_info to
5672 hppa_build_one_stub.
5673 (elf32_hppa_create_dynamic_sections): New function
5674 to create .plt and .got then set .plt flags correctly.
5675 (elf_backend_create_dynamic_sections): Define.
5676 (elf32_hppa_object_p): New function.
5677 (elf_backend_object_p): Define.
5678 (elf32_hppa_elf_get_symbol_type): New function.
5679 (elf_backend_get_symbol_type): Define.
5680 (elf_backend_can_gc_sections): Define.
5681 (elf_backend_want_got_plt): Define.
5682 (elf_backend_plt_alignment): Set to 2.
5683 (elf_backend_plt_readonly): Define.
5684 (elf_backend_want_plt_sym): Define.
5685 (elf_backend_got_header_size): Reserve one entry.
5686
5687 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
5688 (elf32_hppa_size_stubs): Pass in multi_subspace.
5689 (elf32_hppa_set_gp): Declare.
5690
5691 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
5692 (bfd_get_unique_section_name): New function.
5693 * bfd-in2.h: Regenerate.
5694
5695 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
5696 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
5697 comment.
5698
5699 From David Huggins-Daines <dhd@linuxcare.com>
5700 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
5701 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
5702 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
5703 been updated in finish_dynamic_symbol before modifying function
5704 symbol.
5705
5706 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
5707 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
5708 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
5709 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
5710 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
5711 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
5712 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
5713 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
5714
5715 From David Huggins-Daines <dhd@linuxcare.com>
5716 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
5717 style of local labels as well.
5718
5719 2000-09-03 Philip Blundell <philb@gnu.org>
5720
5721 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
5722 references to undefined symbols in debugging sections.
5723
5724 2000-09-02 H.J. Lu <hjl@gnu.org>
5725
5726 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
5727 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
5728 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
5729 section.
5730
5731 2000-09-02 Jason Eckhardt <jle@cygnus.com>
5732
5733 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
5734 (elf32_i860_is_local_label_name): New function and prototype.
5735
5736 2000-09-02 Nick Clifton <nickc@redhat.com>
5737
5738 * configure.in: Increase version number to 2.10.91.
5739 * configure: Regenerate.
5740 * aclocal.m4: Regenerate.
5741 * config.in: Regenerate.
5742 * po/bfd.pot: Regenerate.
5743
5744 2000-09-02 Daniel Berlin <dberlin@redhat.com>
5745
5746 * elf.c (_bfd_elf_make_section_from_shdr): Add
5747 .gnu.linkobce.wi. to the list of debug section names.
5748
5749 2000-09-02 Nick Clifton <nickc@redhat.com>
5750
5751 * dwarf2.c (find_debug_info): New function: Locate a section
5752 containing dwarf2 debug information.
5753 (bfd_dwarf2_find_nearest_line): Find all sections containing
5754 debug information and include them in the stash.
5755
5756 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
5757
5758 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
5759 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
5760 (sh_reloc_map): Add new relocs.
5761 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
5762 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
5763 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
5764 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
5765 functions.
5766 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
5767 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
5768 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
5769 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5770 New array constants.
5771 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
5772 New variables.
5773 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
5774 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
5775 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
5776 elf_sh_plt_reloc_offset): Define.
5777 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
5778 elf_sh_link_hash_table): New structs.
5779 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
5780 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
5781 relocation types.
5782 (elf_backend_create_dynamic_sections,
5783 bfd_elf32_bfd_link_hash_table_create,
5784 elf_backend_adjust_dynamic_symbol,
5785 elf_backend_size_dynamic_sections,
5786 elf_backend_finish_dynamic_symbol,
5787 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
5788 elf_backend_plt_readonly, elf_backend_want_plt_sym,
5789 elf_backend_got_header_size, elf_backend_plt_header_size):
5790 Define.
5791 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
5792 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
5793 New relocs.
5794 * bfd-in2.h, libbfd.h: Rebuilt.
5795
5796 2000-09-01 Alan Modra <alan@linuxcare.com.au>
5797
5798 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
5799 change.
5800
5801 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
5802
5803 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
5804 not initialized, set them to indicate the SH1 instruction set.
5805
5806 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
5807
5808 * acinclude.m4: Include libtool and gettext macros from the
5809 top level.
5810 * aclocal.m4, configure: Rebuilt.
5811
5812 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
5813
5814 * elf.c: Eliminate references to __sparcv9 macro; replace with
5815 autoconf variables HAVE_PSINFO32_T etc.
5816 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
5817 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
5818 * config.in: Ditto.
5819 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
5820 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
5821 * aclocal.m4: Ditto.
5822 * configure: Regenerate.
5823
5824 2000-08-27 Alan Modra <alan@linuxcare.com.au>
5825
5826 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
5827 for any shared link, not just shared -Bsymbolic.
5828 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
5829 any shared link, and pass link info to it.
5830 (elf_i386_size_dynamic_sections): Update comment.
5831 (elf_i386_discard_copies): Modify to discard relocs for symbols
5832 that have been forced local.
5833 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
5834 that have been forced local.
5835
5836 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
5837
5838 * elflink.h (elf_link_add_object_symbols): Allow common
5839 symbols to have an alignment of 1 if explicitly requested, and
5840 not overridden by other definitions.
5841
5842 2000-08-22 Doug Kwan <dkwan@transmeta.com>
5843
5844 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
5845 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
5846
5847 2000-08-22 H.J. Lu <hjl@gnu.org>
5848
5849 * elf-bfd.h (elf_link_hash_table): Add runpath.
5850
5851 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
5852 * bfd-in2.h: Rebuilt.
5853
5854 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
5855 "runpath" field to NULL.
5856 (bfd_elf_get_runpath_list): New function.
5857
5858 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
5859 DT_RUNPATH entries.
5860
5861 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
5862
5863 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
5864 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
5865 explicitly. Improve validation of r_type.
5866
5867 2000-08-21 H.J. Lu <hjl@gnu.org>
5868
5869 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
5870 dynamic allocated content space. Add a comment to remind us that
5871 one day this ought to be fixed.
5872 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
5873 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
5874 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
5875
5876 2000-08-21 Jason Eckhardt <jle@cygnus.com>
5877
5878 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
5879 field with the newly relocated value instead of adding it to the
5880 existing immediate field.
5881 (elf32_i860_relocate_splitn): Likewise.
5882 (elf32_i860_relocate_highadj): Likewise.
5883
5884 2000-08-16 Jason Eckhardt <jle@cygnus.com>
5885
5886 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
5887 was previously just a stub).
5888
5889 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
5890
5891 * elflink.c (_bfd_elf_create_got_section): Don't abort().
5892 Formatting fixes.
5893 (_bfd_elf_create_dynamic_sections): Likewise.
5894
5895 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
5896
5897 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
5898 for undefined symbols to be the beginning of the section.
5899
5900 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
5901 four extra entries at the beginning of the .rela.plt section.
5902 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
5903 section to account for the four reserved entries in the .plt section.
5904
5905 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
5906
5907 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
5908 to the list of NOPs we recognize after a branch-and-link.
5909 Use the ori NOP when one is needed.
5910
5911 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
5912 for large archives.
5913
5914 2000-08-14 Jim Wilson <wilson@cygnus.com>
5915
5916 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
5917 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
5918 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
5919 EF_IA_64_ABSOLUTE.
5920
5921 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
5922
5923 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
5924
5925 2000-08-10 Jason Eckhardt <jle@cygnus.com>
5926
5927 * elf32-i860.c (elf32_i860_relocate_section): New function.
5928 (i860_final_link_relocate): New function.
5929 (elf32_i860_relocate_splitn): New function.
5930 (elf32_i860_relocate_pc16): New function.
5931 (elf32_i860_relocate_highadj): New function.
5932 (elf32_i860_howto): Minor adjustments to some relocations.
5933 (elf_info_to_howto_rel): Define.
5934 (elf_backend_relocate_section): Define.
5935
5936 2000-08-10 Nick Clifton <nickc@cygnus.com>
5937
5938 * elf32-arm.h: Fix formatting.
5939
5940 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
5941
5942 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
5943
5944 2000-08-08 Jason Eckhardt <jle@cygnus.com>
5945
5946 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
5947
5948 2000-08-07 Kazu Hirata <kazu@hxi.com>
5949
5950 * ieee.c (ieee_write_debug_part): Rewrite a comment.
5951 * elf64-ia64.c: Fix a typo.
5952
5953 2000-08-05 Jason Eckhardt <jle@cygnus.com>
5954
5955 * elf32-i860.c (elf32_i860_howto_table): New structure.
5956 (lookup_howto): New function.
5957 (elf32_i860_reloc_type_lookup): New function.
5958 (elf32_i860_info_to_howto_rela): New function.
5959 (elf_code_to_howto_index): New structure.
5960 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
5961 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
5962 elf32_i860_reloc_type_lookup.
5963
5964 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
5965
5966 * som.c (struct fixup_format): Constify `format'.
5967 (som_hppa_howto_table): Use SOM_HOWTO macro.
5968 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
5969 (som_bfd_reloc_type_lookup): Likewise.
5970 (compare_subspaces): Remove unused `count1', `count2'.
5971 (som_begin_writing): Remove unused `total_reloc_size'.
5972 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
5973 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
5974 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
5975 (som_find_nearest_line): Decorate unused parameter(s).
5976 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
5977 (som_bfd_link_split_section): Likewise.
5978
5979 2000-08-03 Nick Clifton <nickc@cygnus.com>
5980
5981 * section.c: Restore backed out code.
5982 * elf.c: Restore backed out code.
5983 (copy_private_bfd_data): Fix bug preventing stipped dynamic
5984 binaries from working.
5985 * bfd-in2.h: Regenerate.
5986
5987 2000-08-03 H.J. Lu <hjl@gnu.org>
5988
5989 * section.c: Back out the change made by Nick Clifton
5990 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
5991 binaries.
5992 * bfd-in2.h: Likewise.
5993 * elf.c: Likewise.
5994
5995 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
5996
5997 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
5998
5999 2000-07-31 Jason Eckhardt <jle@cygnus.com>
6000
6001 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
6002 * bfd-in2.h, libbfd.h: Regenerate.
6003
6004 2000-07-31 Nick Clifton <nickc@cygnus.com>
6005
6006 * section.c (struct sec): Add new boolean field 'segment_mark'.
6007 (STD_SECTION): Initialise new field to zero.
6008
6009 * bfd-in2.h: Regenerate.
6010
6011 * elf.c (copy_private_bfd_data): Reorganise section to segment
6012 mapping to cope with moved sections requiring new segments,
6013 and overlapping segments.
6014 (SEGMENT_END): New macro: Return the end address of a segment.
6015 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
6016 contains a section by comparing their VMA addresses.
6017 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
6018 contains a section by comparing their LMA addresses.
6019 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
6020 section should be included in a segment.
6021 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
6022 follows another in memory.
6023 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
6024 segments overlap.
6025
6026 2000-07-22 Jason Eckhardt <jle@cygnus.com>
6027
6028 * cpu-i860.c: Added comments.
6029
6030 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
6031 bfd_elf32_i860_little_vec.
6032 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
6033 (ELF_MAXPAGESIZE): Changed to 4096.
6034
6035 * targets.c (bfd_elf32_i860_little_vec): Declaration of
6036 new target.
6037 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
6038
6039 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
6040 config for little endian elf32 i860.
6041 (targ_defvec): Define for the new config above
6042 as "bfd_elf32_i860_little_vec".
6043 (targ_selvecs): Define for the new config above
6044 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
6045
6046 * configure.in (bfd_elf32_i860_little_vec): Added recognition
6047 of new target vec.
6048
6049 * configure: Regenerated.
6050
6051 2000-07-27 H.J. Lu <hjl@gnu.org>
6052
6053 * elflink.h (elf_merge_symbol): Take one more argument,
6054 dt_needed, to indicate if the symbol comes from a DT_NEEDED
6055 entry. Don't overide the existing weak definition if dt_needed
6056 is true.
6057 (elf_link_add_object_symbols): Pass dt_needed to
6058 elf_merge_symbol ().
6059
6060 2000-07-27 Nick Clifton <nickc@cygnus.com>
6061
6062 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
6063 allocated contents.
6064
6065 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
6066
6067 * configure.host (*-*-aix*): AIX has 'long long' always.
6068
6069 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
6070 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
6071 (xcoff_write_archive_contents_big): Don't update the offset
6072 of the symbol table, xcoff_write_armap will do it.
6073
6074 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
6075
6076 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
6077 of dynobj for SGI_COMPAT checks.
6078
6079 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
6080
6081 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
6082 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
6083 * bfd-in2.h: Regenerate.
6084
6085 2000-07-21 Nick Clifton <nickc@cygnus.com>
6086
6087 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
6088 range symbol indices in relocs and issue an error message.
6089
6090 2000-07-20 H.J. Lu <hjl@gnu.org>
6091
6092 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
6093 info->new_dtags when setting DT_FLAGS_1. It will only be set
6094 by the new linker options. It shouldn't break anything.
6095
6096 2000-07-20 H.J. Lu <hjl@gnu.org>
6097
6098 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
6099 only if info->new_dtags is true.
6100
6101 2000-07-20 H.J. Lu <hjl@gnu.org>
6102
6103 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
6104 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
6105
6106 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
6107
6108 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
6109 (ALL_MACHINES_CFILES): Add cpu-cris.c.
6110 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
6111 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
6112 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
6113 * Makefile.in: Rebuild.
6114 * aclocal.m4: Rebuild.
6115 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
6116 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
6117 (bfd_cris_arch): Declare.
6118 (bfd_archures_list): Add bfd_cris_arch.
6119 * bfd-in2.h: Rebuild.
6120 * config.bfd: (cris-*-*): New target.
6121 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
6122 * configure: Rebuild.
6123 * elf.c (prep_headers): Add bfd_arch_cris.
6124 * libbfd.h: Rebuild.
6125 * libaout.h (enum machine_type): Add M_CRIS.
6126 * reloc.c: Add CRIS relocations.
6127 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
6128 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
6129 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
6130 * po/POTFILES.in, po/bfd.pot: Regenerate.
6131
6132 2000-07-19 H.J. Lu <hjl@gnu.org>
6133
6134 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
6135 DF_TEXTREL if DT_TEXTREL is set.
6136 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6137 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6138 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6139 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
6140 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6141 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6142 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
6143 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6144 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
6145 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6146
6147 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6148 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6149 DT_RPATH is set.
6150 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6151
6152 2000-07-19 H.J. Lu <hjl@gnu.org>
6153
6154 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6155 * bfd-in2.h: Rebuild.
6156
6157 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6158 (elf_dt_soname): New.
6159
6160 * elf.c (bfd_elf_set_dt_needed_soname): New.
6161
6162 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
6163 entry if the shared object loaded by DT_NEEDED is used to
6164 resolve the reference in a regular object.
6165
6166 2000-07-19 H.J. Lu <hjl@gnu.org>
6167
6168 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6169 DT_DEPAUDIT and DT_AUDIT as strings.
6170
6171 2000-07-19 Nick Clifton <nickc@cygnus.com>
6172
6173 * format.c: Fix formatting.
6174
6175 2000-07-19 H.J. Lu <hjl@gnu.org>
6176
6177 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
6178
6179 2000-07-19 H.J. Lu <hjl@gnu.org>
6180
6181 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
6182 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
6183 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
6184 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
6185 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
6186 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
6187 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
6188
6189 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
6190
6191 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
6192 renamed functions from here...
6193 (assign_section_numbers): Use renamed functions.
6194 (prep_headers): Use renamed functions.
6195
6196 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
6197 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
6198 * bfd-in2.h: Regenerate.
6199
6200 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
6201
6202 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
6203 parenthesis in if statement.
6204
6205 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
6206
6207 Enable the support for Traditional MIPS.
6208 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
6209 return ict_none appropriately for traditional mips targets.
6210 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
6211 (STUB_MOVE): Conditionalize for traditonal mips.
6212 (STUB_LI16): Likewise.
6213 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
6214 room for RTPROC header.
6215 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
6216 the permission for the PT_DYNAMIC as read, write and execute.
6217 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
6218 for traditonal mips.
6219 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
6220 _DYNAMIC_LINKING for traditonal mips.
6221 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
6222 in case of traditonal mips.
6223 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
6224 entry is required. For a function if PLT is not required then set the
6225 corresponding hash table entry to 0.
6226 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
6227 traditonal mips.
6228 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
6229 shared object set the value to 0.
6230 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
6231 _DYNAMIC_LINKING for traditonal mips.
6232 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
6233 for traditonal mips.
6234
6235 2000-07-15 H.J. Lu <hjl@gnu.org>
6236
6237 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
6238
6239 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
6240
6241 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
6242 out a structure that is BFD_IN_MEMORY.
6243
6244 2000-07-11 Alan Modra <alan@linuxcare.com.au>
6245
6246 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
6247 bfd pointer. Print section id instead of bfd pointer for local
6248 syms. Prefix addend with `+' for global syms as well as local.
6249 Correct calculation of name component lengths.
6250 (elf64_hppa_check_relocs): Update call to get_dyn_name.
6251
6252 From David Huggins-Daines <dhd@linuxcare.com>
6253 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
6254 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
6255 (elf64_hppa_modify_segment_map): Likewise.
6256
6257 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6258
6259 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
6260 addresses to be "naturally" sign extended. Return -1 if unknown.
6261 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
6262 * bfd-in2.h: Regenerate.
6263
6264 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6265
6266 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
6267 and ECOF_SIGNED_64 to list ways to extract an offset.
6268 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
6269 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
6270 Update.
6271 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
6272 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
6273
6274 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6275
6276 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
6277 bfd_get_start_address.
6278 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
6279 (elf_swap_ehdr_out): Ditto.
6280
6281 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
6282
6283 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
6284 compatibility with older binutils.
6285
6286 2000-07-10 Alan Modra <alan@linuxcare.com.au>
6287
6288 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
6289 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
6290
6291 From Ryan Bradetich <rbradetich@uswest.net>
6292 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
6293 (parse_line_table): Ditto.
6294 (_bfd_dwarf1_find_nearest_line): Ditto.
6295 * syms.c (cmpindexentry): Remove extra `*' from params.
6296
6297 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
6298
6299 * elf32-mips.c (sort_dynamic_relocs): New Function.
6300 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
6301 via qsort to sort the dynamic relocations in increasing r_symndx
6302 value.
6303
6304 2000-07-09 Alan Modra <alan@linuxcare.com.au>
6305
6306 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
6307 ATTRIBUTE_UNUSED to unused args.
6308 (get_opd): Likewise.
6309 (get_plt): Likewise.
6310 (get_dlt): Likewise.
6311 (get_stub): Likewise.
6312 (elf64_hppa_adjust_dynamic_symbol): Likewise.
6313 (elf64_hppa_link_output_symbol_hook): Likewise.
6314 (elf64_hppa_check_relocs): Delete unused var.
6315 (elf64_hppa_size_dynamic_sections): Likewise.
6316 (elf64_hppa_finalize_opd): Likewise.
6317 (elf64_hppa_finalize_dynreloc): Likewise.
6318 (elf64_hppa_modify_segment_map): Likewise.
6319 (elf64_hppa_finish_dynamic_sections): Likewise.
6320
6321 * elf-hppa.h (elf_hppa_final_write_processing): Add
6322 ATTRIBUTE_UNUSED to unused args.
6323 (elf_hppa_final_link_relocate): Likewise.
6324 (elf_hppa_record_segment_addrs): Add paretheses.
6325 (elf_hppa_relocate_section): Constify dyn_name.
6326
6327 From David Huggins-Daines <dhd@linuxcare.com>
6328 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
6329 rearrange case statement so that it gets preferred to 32-bit ones.
6330
6331 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
6332 asection->id instead of address of asection structure.
6333 (elf32_hppa_size_stubs): Likewise.
6334
6335 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
6336 for .init* and .fini*.
6337
6338 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
6339 and addends used in stub names to 32 bits.
6340 (elf32_hppa_size_stubs): Likewise.
6341
6342 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
6343 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
6344 not bfd_put_64. Fix minor comment typo and formatting.
6345
6346 Changes to create multiple linker stubs, positioned immediately
6347 before the section where they are required.
6348 * elf32-hppa.c: Don't include hppa_stubs.h.
6349 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
6350 (elf32_hppa_stub_hash_table): Delete.
6351 (elf32_hppa_link_hash_entry): Delete.
6352 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
6353 stub_hash_table, and store the struct here rather than a pointer.
6354 Delete output_symbol_count. Add offset array. Change
6355 global_value to a bfd_vma.
6356 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
6357 (elf32_hppa_stub_hash_traverse): Delete.
6358 (elf32_hppa_name_of_stub): Delete.
6359 (elf32_hppa_link_hash_lookup): Delete.
6360 (elf32_hppa_link_hash_traverse): Delete.
6361 (elf32_hppa_stub_hash_table_init): Delete.
6362 (elf32_hppa_size_of_stub): Pass input section and offset rather
6363 than location and calculate location here. Don't pass name as all
6364 stubs are now the same size.
6365 (elf32_hppa_stub_hash_newfunc): Init new fields.
6366 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
6367 too.
6368 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
6369 comparing against ints. Rewrite stub handling code.
6370 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
6371 Case enums to int before comparing against ints. Remove
6372 bfd_reloc_dangerous case.
6373 (elf32_hppa_build_one_stub): Rewrite.
6374 (elf32_hppa_size_one_stub): New function.
6375 (elf32_hppa_build_stubs): Rewrite.
6376 (elf32_hppa_size_stubs): Pass in linker call-back functions.
6377 Rewrite stub-handling specific code.
6378
6379 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
6380
6381 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
6382
6383 * hppa_stubs.h: Delete.
6384 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
6385 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
6386 * Makefile.in: Regenerate.
6387
6388 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
6389 e_nlrsel.
6390
6391 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
6392
6393 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
6394 and section name for bfd_reloc_notsupported error message.
6395 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
6396 bfd_reloc_notsupported.
6397 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
6398
6399 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
6400 undefined weak symbols for all relocs.
6401 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
6402 offsets are relative to one past the delay slot.
6403 (elf32_hppa_size_stubs): Account for reloc addend when calculating
6404 branch destination. Put addend into stub name too.
6405 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
6406 adjust by 8 when deciding whether a linker stub is needed. Put
6407 addend into stub name as for above.
6408
6409 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
6410 various args and vars.
6411 (elf32_hppa_bfd_final_link_relocate): Here too.
6412 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
6413 inner block var to avoid shadowing.
6414
6415 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
6416 unsigned.
6417 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
6418 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
6419 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
6420
6421 * libhppa.h: Change practically all unsigned ints to plain ints.
6422 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
6423 prototypes.
6424
6425 From Ryan Bradetich <rbradetich@uswest.net>
6426 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
6427 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
6428 suit above.
6429 From David Huggins-Daines <dhd@linuxcare.com>
6430 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
6431 to the new OP_* ones.
6432
6433 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
6434 error exit. Bail out earlier on plabel relocs that we aren't
6435 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
6436 string, and then don't free our copy.
6437 (elf32_hppa_build_one_stub): Make insn unsigned int.
6438
6439 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
6440 available with BL, not BE and BLE.
6441
6442 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
6443 code for elf arg relocs.
6444 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
6445 argument with elf_link_hash_entry h. Handle undefined weak
6446 symbols. Move $global$ lookup from here...
6447 (elf32_hppa_relocate_section): ...to here. Return correct error
6448 message for non-handled relocs.
6449 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
6450 wrong test was -0x3ffff to +0x40000.
6451
6452 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
6453 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
6454 Handle them as such.
6455 (elf_hppa_relocate_insn): Fix a typo.
6456
6457 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
6458 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
6459 assemble_17, assemble_21): Delete.
6460 Supply defines for all 64 possible opcodes.
6461 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
6462 formats. Handle COMICLR.
6463 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
6464 -10, -16, 16, 22.
6465
6466 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
6467 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
6468 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
6469 to suit.
6470 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
6471 the local syms - did this code get deleted accidentally? Ignore
6472 undefined and undefweak syms.
6473
6474 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
6475 block. Use it instead of elf64_hppa_hash_table (info).
6476 (elf_hppa_final_link_relocate): Use hppa_info instead of
6477 elf64_hppa_hash_table (info).
6478
6479 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
6480 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
6481 (hppa_rebuild_insn): Mask immediate bits here instead.
6482 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
6483
6484 2000-07-08 Alan Modra <alan@linuxcare.com.au>
6485
6486 * section.c (struct sec): Add id field. Tidy comment formatting.
6487 (bfd_make_section_anyway): Set id.
6488 (STD_SECTION): Init id too.
6489 Change CONST to const throughout.
6490 * archures.c (bfd_arch_info): Tidy comment.
6491 (bfd_arch_list): Change a CONST to const.
6492 * libbfd-in.h: Tidy comments and replace CONST with const.
6493 * elf-bfd.h: Likewise.
6494 * libbfd.h: Regenerate.
6495 * bfd-in2.h: Regenerate.
6496 * libcoff.h: Regenerate.
6497
6498 2000-07-07 DJ Delorie <dj@redhat.com>
6499
6500 * archive.c (_bfd_write_archive_contents): Add an informative
6501 comment.
6502
6503 2000-07-06 Kazu Hirata <kazu@hxi.com>
6504
6505 * srec.c: Fix formatting.
6506
6507 2000-06-05 DJ Delorie <dj@redhat.com>
6508
6509 * MAINTAINERS: new
6510
6511 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
6512
6513 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
6514 value of PC-relative offsets.
6515
6516 2000-07-03 Jim Wilson <wilson@cygnus.com>
6517
6518 * elf64-alpha.c (alpha_elf_size_info): New.
6519 (elf_backend_size_info): Define to alpha_elf_size_info.
6520 * elfcode.h (elf_size_info): Change hash bucket size to 4.
6521
6522 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
6523
6524 * elf32-mips.c: Include elf32-target.h again for the traditional
6525 MIPS targets.
6526
6527 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
6528
6529 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
6530 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
6531 (avr_info_to_howto_rela): Likewise.
6532 (elf32_avr_gc_mark_hook): Likewise.
6533 (elf32_avr_gc_sweep_hook): Likewise.
6534 (elf32_avr_relocate_section): Likewise.
6535
6536 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
6537
6538 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
6539 an external symbol for a non-shared, non-relocatable link.
6540
6541 2000-07-03 Nick Clifton <nickc@redhat.com>
6542
6543 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
6544 is an external symbol.
6545 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
6546 external symbol.
6547
6548 2000-07-03 Kazu Hirata <kazu@hxi.com>
6549
6550 * reloc16.c: Fix formatting.
6551
6552 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
6553
6554 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
6555 to add a new target for traditional mips i.e
6556 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
6557 * configure.in: Likewise.
6558 * configure: Rebuild.
6559 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
6560 bfd_target_vector.
6561 (bfd_elf32_tradlittlemips_vec): Likewise.
6562 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
6563 to see that elfNN_bed does not get redefined even if the target file
6564 is included twice for a chip. See elf32-mips.c.
6565
6566 2000-07-01 Alan Modra <alan@linuxcare.com.au>
6567
6568 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
6569 (CLEANFILES): Add DEPA.
6570 * Makefile.in: Regenerate.
6571
6572 2000-06-30 DJ Delorie <dj@cygnus.com>
6573
6574 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
6575 can't assume the PE header is at 0x80.
6576
6577 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
6578
6579 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
6580
6581 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
6582
6583 * go32stub.h: Update stub.
6584
6585 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
6586
6587 * archures.c (bfd_mach_avr5): Define.
6588 * bfd-in2.h (bfd_mach_avr5): Define.
6589 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
6590 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
6591 (compatible): Update comment. Add missing test.
6592 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
6593 for avr2 and avr4. Simplify 8K wrap code.
6594 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
6595 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
6596
6597 2000-06-26 Kazu Hirata <kazu@hxi.com>
6598
6599 * coff-h8300.c: Fix formatting.
6600 * cpu-h8300.c: Likewise.
6601
6602 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
6603
6604 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
6605 for local symbols whose names are unknown.
6606
6607 2000-06-22 Alan Modra <alan@linuxcare.com.au>
6608
6609 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
6610 find one.
6611 * Makefile.in: Regenerate.
6612 * doc/Makefile.in: Regenerate.
6613
6614 2000-06-20 H.J. Lu <hjl@gnu.org>
6615
6616 * Makefile.am: Rebuild dependency.
6617 * Makefile.in: Rebuild.
6618
6619 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6620
6621 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
6622 (elf_backend_copy_indirect_symbol): Map to the new function.
6623
6624 2000-06-20 Alan Modra <alan@linuxcare.com.au>
6625
6626 * archive.c (normalize): Correct pointer comparison when checking
6627 for backslashes.
6628 (bfd_bsd_truncate_arname): Likewise.
6629 (bfd_gnu_truncate_arname): Likewise.
6630
6631 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
6632
6633 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
6634 sections elf_{text,data}_{section,symbol}.
6635 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
6636 (_bfd_mips_elf_hide_symbol): New function.
6637 (elf_backend_hide_symbol): Map to the new function.
6638 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
6639 definitions of mips_elf_{text,data}_{section,symbol}.
6640 (mips_elf_local_relocation_p): Try to find the direct symbol
6641 based on new check_forced argument.
6642 (mips_elf_calculate_relocation): Use new version of
6643 mips_elf_local_relocation_p.
6644 (mips_elf_relocate_section): Likewise.
6645 (_bfd_mips_elf_relocate_section): Likewise.
6646 (mips_elf_sort_hash_table): Only assert that have enough GOT
6647 space.
6648 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
6649 entry if the relocation based on the new external argument.
6650 (mips_elf_create_dynamic_relocation): Assert that we have a
6651 section contents allocated where we can swap out the dynamic
6652 relocations.
6653 (mips_elf_calculate_relocation): Find the real hash-table entry
6654 correctly by using h->root.root.type. Only create a dynamic
6655 relocation entry if the symbol is defined in a shared library.
6656 Create an external GOT entry for the GOT16 relocation if the
6657 symbol was forced local.
6658 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
6659 dynamic index if the symbol was forced local.
6660
6661 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6662
6663 * elf32-mips.c: Fix typos in comments.
6664
6665 2000-06-19 Mark Kettenis <kettenis@gnu.org>
6666
6667 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
6668 CORE_VERSION_1.
6669
6670 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
6671
6672 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
6673 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
6674 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
6675 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
6676 (bfd_elf32_m68hc11_vec): Likewise.
6677 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
6678 Supports 68hc11 & 68hc12 at the same time.
6679 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
6680 bfd_target_vector.
6681 (bfd_elf32_m68hc11_vec): Likewise.
6682 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
6683 * archures.c (bfd_m68hc12_arch): Define and register in global list
6684 (bfd_m68hc11_arch): Likewise.
6685 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
6686 BFD_RELOC_M68HC11_3B): Define.
6687 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
6688 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
6689
6690 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
6691
6692 * elf_bfd.h (struct elf_backend_data): Add info argument to
6693 elf_backend_hide_symbol.
6694 (_bfd_elf_link_hash_hide_symbol): Likewise.
6695 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
6696 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
6697 * elflink.h (elf_link_add_object_symbols): Likewise.
6698 (elf_link_assign_sym_version): Likewise.
6699
6700 2000-06-18 H.J. Lu <hjl@gnu.org>
6701
6702 * coff-i386.c (coff_i386_reloc): Don't return in case of
6703 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
6704 Compensate PE relocations when linking with non-PE object
6705 files to generate a non-PE executable.
6706
6707 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
6708
6709 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
6710 GOT entries if we're doing a static link or -Bsymbolic link.
6711
6712 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
6713
6714 * elflink.h (elf_link_adjust_relocs): Check for and call backend
6715 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
6716 available.
6717 (elf_link_output_relocs): Likewise.
6718 (elf_reloc_link_order): Likewise.
6719
6720 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6721
6722 * archures.c (enum bfd_architecture): #define constants for
6723 PowerPc and RS6000 machine numbers.
6724 * bfd-in2.h: Regenerate.
6725 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
6726 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
6727 and RS6000 machine numbers using #defined constants from
6728 archures.c.
6729 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
6730 machine numbers using #defined constants from archures.c. Add
6731 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
6732 64-bit words in 620 entry.
6733 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
6734 RSC, and RS2.
6735 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
6736
6737 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
6738
6739 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
6740 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
6741 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
6742
6743 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6744
6745 * bfd-in.h (bfd_family_coff): Define.
6746 * bfd-in2.h: Regenerate.
6747 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
6748 coff_find_nearest_line): Check COFFness using bfd_family_coff()
6749 instead of bfd_target_coff_flavour.
6750 * cofflink.c (_bfd_coff_final_link): Likewise.
6751 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
6752 exclude XCOFF files.
6753 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
6754 Likewise.
6755 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
6756 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
6757 * xcofflink.c (XCOFF_XVECP): Delete.
6758 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
6759 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
6760 bfd_xcoff_record_link_assignment,
6761 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
6762 check for bfd_target_xcoff_flavour.
6763
6764 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6765
6766 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
6767 files on AIX 4.3.
6768 (read_hdr): New function.
6769 (rs6000coff_core_p): Store mstsave or __context64 struct instead
6770 of trying to extract individual registers. Set abfd->arch_info
6771 to match the architecture that created the core file.
6772 (rs6000coff_get_section_contents): Delete.
6773 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
6774
6775 2000-06-14 H.J. Lu <hjl@gnu.org>
6776
6777 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
6778 is NULL.
6779
6780 2000-06-13 H.J. Lu <hjl@gnu.org>
6781
6782 * configure: Regenerate.
6783
6784 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
6785
6786 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
6787 armpei_little_vec.
6788
6789 2000-06-08 David O'Brien <obrien@FreeBSD.org>
6790
6791 * configure.in (VERSION): Update to show this is the CVS mainline.
6792
6793 2000-06-07 Alan Modra <alan@linuxcare.com.au>
6794
6795 * elf32-d10v.c: Include elf/d10v.h
6796 (enum reloc_type): Delete.
6797 * elf32-d30v.c: Include elf/d30v.h
6798 (enum reloc_type): Delete.
6799
6800 * Makefile.am: Run "make dep-am" to regenerate dependencies.
6801 * Makefile.in: Regenerate.
6802
6803 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
6804 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
6805 move HOWTOs into elf_howto_table.
6806 (R_386_standard, R_386_ext_offset): Define.
6807 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
6808 (elf_i386_reloc_type_lookup): Modify calculation of index into
6809 elf_howto_table since we've removed the padding.
6810 (elf_i386_info_to_howto_rel): Likewise.
6811 (elf_i386_relocate_section): Likewise.
6812
6813 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
6814
6815 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
6816
6817 2000-06-05 H.J. Lu <hjl@gnu.org>
6818
6819 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
6820 an error when seeing an undefined symbol with hidden/internal
6821 attribute. It is handled in *_relocate_section ().
6822
6823 2000-06-05 H.J. Lu <hjl@gnu.org>
6824
6825 * elflink.h (elf_fix_symbol_flags): Follow the link for the
6826 indirect symbol for the ELF_LINK_NON_ELF bit.
6827 (elf_link_output_extsym): Don't output the indirect symbol even
6828 if the ELF_LINK_NON_ELF bit is set.
6829
6830 2000-06-01 J.T. Conklin <jtc@redback.com>
6831
6832 * config.bfd (i[3456]86-*-netbsdelf*): New target.
6833 (i[3456]86-*-netbsdaout*): New target.
6834 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
6835 (i[3456]86-*-openbsd*): Likewise.
6836
6837 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
6838
6839 * trad-core.c: From hpux-core.c, include <dirent.h> or
6840 <sys/ndir.h> when possible.
6841
6842 2000-05-31 Ulrich Drepper <drepper@redhat.com>
6843
6844 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
6845 definitions. We must not assume they are sorted in the file
6846 according to their index numbers.
6847
6848 2000-05-31 Alan Modra <alan@linuxcare.com.au>
6849
6850 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
6851 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
6852 R_PARISC_DIR17F are for absolute branches; Handle them as such.
6853
6854 2000-05-30 Nick Clifton <nickc@cygnus.com>
6855
6856 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
6857 80960CA, 80960MC as valid machine names.
6858
6859 2000-05-30 H.J. Lu <hjl@gnu.org>
6860
6861 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
6862 visibility bits if the symbol is undefined. Correctly handle
6863 weak undefined symbols with hidden and internal attributes.
6864
6865 * elflink.h (elf_link_add_object_symbols): Always turn the
6866 symbol into local if it has the hidden or internal attribute.
6867
6868 2000-05-29 Philip Blundell <philb@gnu.org>
6869
6870 * ppcboot.c: Add packed attribute if compiling with GCC.
6871
6872 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
6873
6874 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
6875
6876 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
6877
6878 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
6879 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
6880 corefile on a 64-bit (Sparc Solaris) host. Also clean up
6881 a few old comments.
6882
6883 2000-05-26 Alan Modra <alan@linuxcare.com.au>
6884
6885 * Makefile.am: Update dependencies with "make dep-am"
6886 * Makefile.in: Regenerate.
6887
6888 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
6889 bindtextdomain): Replace defines with those from intl/libgettext.h
6890 to quieten gcc warnings.
6891
6892 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
6893
6894 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
6895
6896 * archive.c (normalize, bfd_bsd_truncate_arname,
6897 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
6898 file names with backslashes.
6899
6900 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
6901 before opening it.
6902
6903 * sysdep.h: Include filenames.h.
6904
6905 2000-05-26 Alan Modra <alan@linuxcare.com.au>
6906
6907 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
6908
6909 2000-05-26 Jakub Jelinek <jakub@redhat.com>
6910
6911 * elf64-sparc.c (sparc64_elf_relax_section): New.
6912 (sparc64_elf_relocate_section): Optimize tail call into branch always
6913 if possible.
6914 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6915 (elf32_sparc_relax_section): New.
6916
6917 2000-05-26 Jakub Jelinek <jakub@redhat.com>
6918
6919 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
6920 Remove unusued variables.
6921 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
6922 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
6923 previous fix, so that shared libs really don't influence targets
6924 extension mask and memory model.
6925
6926 2000-05-23 H.J. Lu <hjl@gnu.org>
6927
6928 * elf64-alpha.c (elf64_alpha_relocate_section): Check
6929 h->root.other not h->other.
6930 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
6931
6932 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
6933
6934 2000-05-23 H.J. Lu <hjl@gnu.org>
6935
6936 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
6937 undefined symbol with the non-default visibility attributes.
6938 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
6939 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
6940 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6941 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6942 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6943 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
6944 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6945 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6946 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6947 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
6948 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6949
6950 2000-05-22 Richard Henderson <rth@cygnus.com>
6951
6952 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
6953 PCREL22, PCREL64I. Zero size of special relocs.
6954 (elf64_ia64_reloc_type_lookup): Likewise.
6955 (USE_BRL, oor_brl, oor_ip): New.
6956 (elf64_ia64_relax_section): New.
6957 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
6958 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
6959 (elf64_ia64_relocate_section): Likewise.
6960 (bfd_elf64_bfd_relax_section): New.
6961 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
6962 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
6963 * bfd-in2.h, libbfd.h: Regenerate.
6964
6965 2000-05-22 Nick Clifton <nickc@cygnus.com>
6966
6967 * configure.in : Add peigen.lo to MIPS PE targets.
6968 * configure: Regenerate.
6969
6970 2000-05-22 Momchil Velikov <velco@fadata.bg>
6971
6972 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
6973 only if it is known for both input and output bfds. Separate
6974 error message strings as in some languages, it may be necessary
6975 to change more than one place in the string to change between
6976 'big' and 'little'.
6977
6978 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
6979 endianess checks, call _bfd_generic_verify_endian_match() instead.
6980
6981 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
6982
6983 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
6984
6985 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
6986 endianess before checking bfd flavours.
6987
6988 2000-05-22 H.J. Lu <hjl@gnu.org>
6989
6990 * elflink.h (elf_link_output_extsym): Clear the visibility
6991 field for symbols not defined locally.
6992
6993 2000-05-18 Alan Modra <alan@linuxcare.com.au>
6994
6995 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
6996 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
6997 (hppa_rebuild_insn): Mask immediate bits here instead.
6998 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
6999
7000 2000-05-18 Momchil Velikov <velco@fadata.bg>
7001
7002 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
7003 relocs for an executable, ensure that they are virtual addresses.
7004
7005 2000-05-18 Jeffrey A Law (law@cygnus.com)
7006
7007 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
7008
7009 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
7010 Rick Gorton <gorton@scrugs.lkg.dec.com>
7011
7012 * elflink.h: Add emitrelocations support: when enabled, relocation
7013 information and relocation sections are put into final output
7014 executables. If the emitrelocations flag is set, do the following:
7015 (elf_bfd_final_link): Emit relocation sections.
7016 (elf_link_input_bfd): Compute relocation section contents.
7017 (elf_gc_sections): Don't clean relocation sections.
7018
7019 2000-05-16 Catherine Moore <clm@cygnus.com>
7020
7021 * som.c (som_decode_symclass): Recognize weak symbols.
7022
7023 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
7024
7025 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
7026 read idata section only from dataoff.
7027 (pe_print_edata): Correctly check for valid eat_member.
7028
7029 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
7030
7031 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
7032
7033 2000-05-14 Philip Blundell <philb@gnu.org>
7034
7035 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
7036
7037 2000-05-12 Alan Modra <alan@linuxcare.com.au>
7038
7039 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
7040
7041 * peigen.c (pe_print_idata): Look for .idata section and print
7042 info even if data directory has zero entries. Read idata section
7043 starting from dataoff, and adjust all data offsets to suit. Cast
7044 all bfd_vma vars to unsigned long before passing to fprintf.
7045 * peigen.c (pe_print_edata): Similarly, look for .edata section
7046 and print info even if data directory has zero entries. Cast
7047 all bfd_vma vars to unsigned long before passing to fprintf.
7048
7049 From Szabolcs Szakacsits <szaka@F-Secure.com>
7050 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
7051 directory size which may be bogus.
7052 * peigen.c (pe_print_edata): Similarly.
7053
7054 2000-05-09 Alan Modra <alan@linuxcare.com.au>
7055
7056 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
7057 section is empty.
7058 (copy_private_bfd_data): Allow for space possibly taken up by elf
7059 headers when calculating segment physical address from lma.
7060
7061 2000-05-08 Alan Modra <alan@linuxcare.com.au>
7062
7063 * versados.c (versados_scan): Init stringlen and pass_2_done.
7064
7065 * trad-core.c (trad_unix_core_file_p): Return
7066 bfd_error_wrong_format rather than bfd_error_file_truncated.
7067
7068 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
7069 add_data_entry. DataDirectory virtual address is relative.
7070 (pe_print_idata): Account for relative DataDirectory virtual
7071 addresses. Don't trash datasize inside POWERPC_LE_PE code.
7072 (pe_print_edata): Similarly.
7073
7074 From Szabolcs Szakacsits <szaka@F-Secure.com>
7075 * peigen.c (dir_names): Add Delay Import Directory.
7076 (pe_print_idata): Always search for bfd section containing
7077 idata address rather than looking up section name. Print this
7078 section name rather than .idata.
7079 (pe_print_edata): Similarly. Also print some fields as %08lx.
7080 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
7081 Win32Version.
7082
7083 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7084
7085 * xcoff.h: Rename to xcoff-target.h
7086 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
7087 * coff-rs6000.c: Ditto.
7088 * coff64-rs6000.c: Ditto.
7089 * coff-pmac.c: Ditto.
7090 * Makefile.in: Regenerate.
7091
7092 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7093
7094 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
7095 Change U802TOC64MAGIC to U803XTOCMAGIC.
7096
7097 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
7098
7099 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
7100 * bfd-in.h: Prototype bfd_elf_get_arch_size.
7101 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
7102
7103 2000-05-04 Alan Modra <alan@linuxcare.com.au>
7104
7105 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
7106
7107 2000-05-03 Martin v. L\81öwis <loewis@informatik.hu-berlin.de>
7108
7109 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
7110 hidden and internal symbols.
7111 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
7112 visibility.
7113 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
7114 assign a PLT or GOT entry to symbols with hidden and
7115 internal visibility.
7116
7117 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
7118
7119 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7120 the .bss section.
7121 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7122
7123 2000-05-02 H.J. Lu <hjl@gnu.org>
7124
7125 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7126 ELFOSABI_SYSV.
7127
7128 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7129
7130 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7131 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
7132 dependencies.
7133 * Makefile.in: Regenerate.
7134
7135 2000-05-01 Jim Wilson <wilson@cygnus.com>
7136
7137 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
7138 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
7139 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
7140 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
7141 * Makefile.in: Rebuild.
7142
7143 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7144
7145 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
7146 doesn't work very well.
7147
7148 * elf-hppa.h (elf_hppa_internal_shdr): Define.
7149 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
7150 Set hdr->s_type to 1 if ARCH_SIZE == 32.
7151 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
7152 (elf_hppa_info_to_howto): Likewise.
7153 (elf_hppa_info_to_howto_rel): Likewise.
7154 (elf_hppa_reloc_type_lookup): Likewise.
7155 (elf_hppa_is_local_label_name): Likewise.
7156 (elf_hppa_fake_sections): Likewise.
7157 (elf_hppa_final_write_processing): Likewise.
7158 (elf_hppa_howto_table): Fully initialise all entries.
7159 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
7160 (elf_hppa_info_to_howto): Likewise.
7161 (elf_hppa_info_to_howto_rel): Likewise.
7162 (elf_hppa_reloc_type_lookup): Likewise.
7163 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
7164 elf_hppa_unmark_useless_dynamic_symbols,
7165 elf_hppa_remark_useless_dynamic_symbols,
7166 elf_hppa_record_segment_addrs, elf_hppa_final_link,
7167 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
7168 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
7169 elf32-hppa.c mess is cleaned up.
7170 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
7171 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
7172 r_field then call hppa_field_adjust inline func with variable
7173 r_field arg, instead call hppa_field_adjust with fixed arg.
7174 In case R_PARISC_PCREL22F, don't set r_field.
7175 (elf_hppa_relocate_insn): Change args and return type to unsigned
7176 int. Call re_assemble_* funcs to do the work.
7177
7178 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
7179 sign extending.
7180
7181 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
7182 extending.
7183 (sign_extend): Mask first before sign extending.
7184 (low_sign_extend): Rewrite without condition expression.
7185 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
7186 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
7187 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7188 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
7189 result as function return value rather than through pointer arg.
7190 Accept unsigned int args, and return unsigned int.
7191 (re_assemble_3): New. Combines function of dis_assemble_3 with
7192 re-assembly of opcode and immediate.
7193 (re_assemble_12): Likewise.
7194 (re_assemble_16): Likewise.
7195 (re_assemble_17): Likewise.
7196 (re_assemble_21): Likewise.
7197 (re_assemble_22): Likewise.
7198 (hppa_field_adjust): Rewrite and document, paying attention to
7199 size of types and signed/unsigned issues.
7200 (get_opcode): Shift before masking.
7201 (FDLW): Rename to FLDW.
7202 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
7203 (hppa_rebuild_insn): Change args and return value to unsigned
7204 int. Make use of re_assemble_*. Correct case 11.
7205
7206 * dep-in.sed: Handle ../opcodes/.
7207 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
7208 elf64-hppa.h, hppa_stubs.h, xcoff.h.
7209 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
7210 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
7211 elfarm-nabi.lo dependencies outside of auto-dependency area.
7212 Regenerate dependencies.
7213 * Makefile.in: Regenerate.
7214
7215 * configure.in (TRAD_HEADER): Test non-null before
7216 AC_DEFINE_UNQUOTED.
7217 * configure: Regenerate.
7218
7219 * reloc.c: Fix mis-spelling in comment.
7220
7221 2000-05-01 Alan Modra <alan@linuxcare.com.au>
7222
7223 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
7224 * vms.c (vms_openr_next_archived_file): Return NULL.
7225
7226 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7227
7228 * coffcode.h Copy changes mistakenly done to libcoff.h in
7229 4/24/2000 patch.
7230
7231 2000-04-29 Andreas Jaeger <aj@suse.de>
7232
7233 * libbfd-in.h: Correctly check GCC version.
7234 * bfd-in.h: Likewise.
7235 * libhppa.h: Likewise.
7236 * libbfd.h: Regenerate.
7237 * bfd-in2.h: Regenerate.
7238
7239 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7240
7241 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
7242 coffdu-rs6000.{lo,c}.
7243 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
7244 on xcoff.h
7245 * Makefile.in: Regenerate.
7246 * xcoff.h: New file.
7247 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
7248 * coff-rs6000.c: Move all declarations and defines that are
7249 common to the xcoff backends into xcoff.h
7250 * coff64-rs6000.c: Ditto,
7251
7252 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7253
7254 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
7255 _bfd_coff_force_symnames in strings and
7256 _bfd_coff_debug_string_prefix_length to their default values.
7257 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
7258
7259 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7260
7261 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
7262 _bfd_coff_force_symnames in strings and
7263 _bfd_coff_debug_string_prefix_length to their default values.
7264
7265 2000-04-27 Alan Modra <alan@linuxcare.com.au>
7266
7267 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
7268 Check local_got_refcounts before dereferencing.
7269
7270 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
7271 before deciding we don't need R_PPC_PLT32 relocation.
7272 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
7273 dereferencing.
7274
7275 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
7276
7277 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
7278 .plt entries.
7279 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
7280 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
7281 (elf_i386_relocate_section): Allow for .plt to go missing.
7282 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
7283 can use a relative reloc for got as elf_i386_relocate_section.
7284 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
7285
7286 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
7287
7288 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
7289
7290 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
7291
7292 * Makefile.am (coff64-rs6000.lo): New rule.
7293 * Makefile.in: Regenerate.
7294 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
7295 xcoff_is_local_label_name, xcoff_rtype2howto,
7296 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
7297 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
7298 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
7299 (NO_COFF_SYMBOLS): Define.
7300 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
7301 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
7302 internally.
7303 (MINUS_ONE): New macro.
7304 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
7305 relocation.
7306 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
7307 coff_SWAP_aux_out): Map to the new functions.
7308 * coff64-rs6000.c: New file.
7309 * libcoff.h (bfd_coff_backend_data): Add new fields
7310 _bfd_coff_force_symnames_in_strings and
7311 _bfd_coff_debug_string_prefix_length.
7312 (bfd_coff_force_symnames_in_strings,
7313 bfd_coff_debug_string_prefix_length): New macros for above fields.
7314 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
7315 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
7316 of using coff_swap_sym_in directly.
7317 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
7318 (coff_set_flags) Set magic for XCOFF64.
7319 (coff_compute_section_file_positions): Add symbol name length to
7320 string section length if bfd_coff_debug_string_prefix_length is
7321 true.
7322 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
7323 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
7324 using coff_swap_lineno_in directly.
7325 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
7326 and _bfd_coff_debug_string_prefix_length fields.
7327 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
7328 symbol names into strings table when
7329 bfd_coff_force_symnames_in_strings is true.
7330 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
7331 SET_RELOC_VADDR): New macros.
7332 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
7333 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
7334 code.
7335 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
7336 changes within RS6000COFF_C specific code.
7337 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
7338 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
7339 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7340 Extend existing hack on target name.
7341 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
7342 target name.
7343 * coff-tic54x.c (ticof): Keep up to date with new fields
7344 in bfd_coff_backend_data.
7345 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
7346 targ_selvecs to include rs6000coff64_vec for rs6000.
7347 * configure.in: Add rs6000coff64_vec case.
7348 * cpu-powerpc.c: New bfd_arch_info_type.
7349
7350 2000-04-24 Jeffrey A Law (law@cygnus.com)
7351
7352 * config.bfd: Only disable elf32-hppa vectors, not all of the
7353 BSD and OSF configuration support. Provide (disabled) clauses
7354 for PA64 support.
7355 * configure.in: Add clause for PA64 support.
7356 * configure: Rebuilt.
7357
7358 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
7359 (bfd_elf64_hppa_vec): Declare.
7360
7361 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
7362 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
7363 (elf64-hppa.lo): Add dependencies.
7364 * Makefile.in: Rebuilt.
7365
7366 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
7367
7368 2000-04-24 Jason Eckhardt <jle@cygnus.com>
7369
7370 * libhppa.h (dis_assemble_16): New function.
7371 (pa_arch): Added pa20w element.
7372
7373 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
7374
7375 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
7376 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
7377 bfd_elf64_slurp_reloc_table.
7378
7379 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
7380 definitions to get external names.
7381 (elf_write_relocs): Renamed from write_relocs and make global.
7382 (elf_slurp_reloc_table): Make global.
7383 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
7384
7385 * archive.c (hpux_uid_gid_encode): New function.
7386 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
7387 defined and the ID is greater than 99999.
7388 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
7389 special uid/gid fields into 32 bit values.
7390
7391 2000-04-21 Matthew Green <mrg@cygnus.com>
7392
7393 * config.bfd: Add NetBSD/sparc64 support.
7394
7395 Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
7396 David Mosberger <davidm@hpl.hp.com>
7397 Timothy Wall <twall@cygnus.com>
7398 Jim Wilson <wilson@cygnus.com>
7399
7400 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
7401 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
7402 (BFD64_BACKENDS): Add elf64-ia64.lo.
7403 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
7404 (cpu-ia64.lo, elf64-ia64.lo): New rules.
7405 * Makefile.in: Rebuild.
7406 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
7407 (bfd_ia64_arch): Declare.
7408 (bfd_archures_list): Add bfd_ia64_arch.
7409 * bfd-in2.h: Rebuild.
7410 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
7411 * configure: Rebuild.
7412 * configure.host: (ia64-*-linux*): New host.
7413 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
7414 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
7415 * elf.c (prep_headers): Add bfd_arch_ia64.
7416 * libbfd.h: Rebuild.
7417 * reloc.c: Add IA-64 relocations.
7418 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
7419 Declare.
7420 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
7421 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
7422
7423 2000-04-21 Richard Henderson <rth@cygnus.com>
7424
7425 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
7426 contents when performing a partial link.
7427 (bfd_elf_d30v_reloc_21): Likewise.
7428
7429 2000-04-20 H.J. Lu <hjl@gnu.org>
7430
7431 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
7432 patch to symbols defined by a shared object.
7433 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
7434
7435 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
7436
7437 K&R compiler fixes.
7438 * dwarf2.c (concat_filename): Avoid string literal concatenation.
7439 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
7440
7441 Mon Apr 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
7442
7443 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
7444 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
7445 (coff-ia64.lo): Add dependency.
7446 * Makefile.in: Regenerate.
7447 * coff-ia64.c: New file.
7448 * efi-app-ia32.c: Ditto.
7449 * efi-app-ia64.c: Ditto.
7450 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
7451 (coff_set_flags): Ditto.
7452 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
7453 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
7454 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
7455 * configure: Regenerate.
7456 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
7457 (PUT_OPTHDR_IMAGE_BASE): Ditto.
7458 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7459 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7460 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7461 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7462 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7463 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7464 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7465 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7466 (GET_PDATA_ENTRY): Ditto.
7467 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
7468 data_start. Use above macros to read fields that are 64 bit wide for
7469 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
7470 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
7471 FileAlignment and SectionAlignment to minimum alignment if they
7472 are zero.
7473 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
7474 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
7475 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
7476 Use above macros to write fields that are 64 bit wide for
7477 COFF_WITH_PEP64.
7478 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
7479 5*4 otherwise. This should be right for IA-32 and IA-64, but may
7480 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
7481 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
7482 begin address, end address, and unwind info address only. Use
7483 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
7484 print addresses.
7485 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
7486 HIGH3ADJ relocation names.
7487 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
7488 * targets.c: Declare bfd_efi_app_ia32_vec and
7489 bfd_efi_app_ia64_vec.
7490 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
7491 bfd_efi_app_ia64_vec.
7492
7493 2000-04-17 Timothy Wall <twall@cygnus.com>
7494
7495 * bfd-in2.h: Add prototypes for tic54x load page access.
7496 * bfd-in.h: Regenerate.
7497 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
7498 in customized _set_arch_mach function.
7499 * coffcode.h (coff_set_alignment_hook): Set section load page if
7500 the appropriate macro is defined.
7501 (write_object_contents): Read section load page.
7502
7503 2000-04-13 Alan Modra <alan@linuxcare.com.au>
7504
7505 * elf32-hppa.h: Update copyright date.
7506
7507 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
7508 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
7509
7510 * elf32-d30v.c (MAX32): Don't use LL suffix.
7511 (MIN32): Define in terms of MAX32.
7512 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
7513
7514 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
7515 expression.
7516
7517 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
7518
7519 2000-04-12 Alan Modra <alan@linuxcare.com.au>
7520
7521 * dep-in.sed: Match space before file name, not after.
7522 * Makefile.am: Regenerate dependencies.
7523 * Makefile.in: Regenerate.
7524
7525 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
7526 case, allow address wrap-around stupidly removed 2000-03-17. Sign
7527 extend without an if statement.
7528
7529 2000-04-11 Alan Modra <alan@linuxcare.com.au>
7530
7531 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
7532 signed quantites.
7533 * elf32-mips.c (gprel16_with_gp): Likewise.
7534 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
7535 here using -0x40000, not (int)0xfffc0000.
7536 (elf32_hppa_size_of_stub): Likewise.
7537
7538 2000-04-11 Timothy Wall <twall@cygnus.com>
7539
7540 * coff-tic54x.c: Now builds with all targets.
7541 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
7542 * Makefile.in: Regenerate.
7543 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
7544 unitialized variable.
7545
7546 Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
7547
7548 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
7549 --enable-build-warnings option.
7550 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
7551 * Makefile.in, configure: Re-generate.
7552
7553 2000-04-07 Nick Clifton <nickc@cygnus.com>
7554
7555 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
7556 BFD_RELOC_THUMB_PCREL_BLX.
7557
7558 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7559 R_ARM_XPC25 and R_ARM_THM_PC22.
7560
7561 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
7562 R_ARM_XPC25 and R_ARM_THM_XPC22.
7563 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
7564 R_ARM_[XPC25|THM_XPC22].
7565
7566 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
7567 elf/arm-oabi.h to elf/arm.h
7568
7569 * Makefile.am: Fix dependency for elfarm-oabi.c
7570 * Makefile.in: Regenerate.
7571
7572 * bfd-in2.h: Regenerate.
7573 * libbfd.h: Regenerate.
7574
7575 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7576
7577 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
7578 and restore it on failure. Release newly allocated tdata on
7579 failure.
7580
7581 Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
7582
7583 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
7584 (decode_line_info): Set it. Report error if unit->line_offset is
7585 equal to or larger than it.
7586
7587 2000-04-07 Timothy Wall <twall@cygnus.com>
7588
7589 * targets.c: Added vecs for tic54x.
7590 * reloc.c: Added relocs for tic54x.
7591 * libbfd.h: Regenerated.
7592 * configure: Add TI COFF vecs for tic54x.
7593 * configure.in: Ditto.
7594 * config.bfd (targ_cpu): Recognize new tic54x target.
7595 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
7596 * bfd-in2.h: Add tic54x target and relocations.
7597 * Makefile.am, Makefile.in: Add tic54x target.
7598 * archures.c (bfd_archures_list): Add tic54x target.
7599 * coff-tic54x.c: New.
7600 * cpu-tic54x.c: New.
7601
7602 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7603
7604 * elfcore.h (elf_core_file_p): call backend_object_p which
7605 thereby gets an opportunity to update the arch/machine type.
7606
7607 2000-04-06 Timothy Wall <twall@cygnus.com>
7608
7609 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
7610 class. Handle SEC_CLINK and SEC_BLOCK flags.
7611 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
7612 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
7613
7614 2000-04-06 Nick Clifton <nickc@cygnus.com>
7615
7616 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
7617 EF_INTERWORK if this is an unknown EABI.
7618 (elf32_arm_merge_private_bfd_data): Check EABI version
7619 numbers. Only check EF_xxx flags if the EABI version number
7620 is unknown.
7621 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
7622 if the EABI version number is unknown.
7623 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
7624 if the EABI version number is unknown.
7625
7626 Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
7627
7628 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
7629 BFD_RELOC_SH_LOOP_END.
7630 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
7631 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
7632 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
7633 (sh_elf_reloc_loop): New function.
7634 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
7635 any more.
7636 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
7637 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
7638 * bfd-in2.h, libbfd.h: Regenerate.
7639
7640 2000-04-04 Alan Modra <alan@linuxcare.com.au>
7641
7642 * po/bfd.pot: Regenerate.
7643
7644 * Makefile.am: Remove extraneous mkdep comment.
7645 (MKDEP): Use gcc -MM rather than mkdep.
7646 (DEP): Quote when passing vars to sub-make. Add warning
7647 message to end.
7648 (DEP1): Rewrite for "gcc -MM".
7649 (CLEANFILES): Add DEP2.
7650 Update dependencies.
7651 * Makefile.in: Regenerate.
7652
7653 2000-04-03 Kevin Buettner <kevinb@redhat.com>
7654
7655 * configure.in: Added corefile support for AIX 4.3. In particular,
7656 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
7657 compiling rs6000-core.c.
7658 * configure: Regenerated.
7659
7660 2000-04-03 H.J. Lu <hjl@gnu.org>
7661
7662 * cache.c (bfd_open_file): Unlink the output file only if
7663 it has non-zero size.
7664
7665 2000-04-01 Ken Block USG <block@zk3.dec.com>
7666
7667 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
7668 relative relocations for non-loaded sections in shared objects.
7669 (elf64_alpha_check_relocs): Similarly.
7670
7671 Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
7672
7673 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
7674 BFD_RELOC_16 to switch for extended relocs.
7675 (MY_swap_ext_reloc_in): New.
7676 (MY_swap_ext_reloc_out): New.
7677 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
7678 than NAME(aout,swap_ext_reloc_in) for extended relocs.
7679 (NAME(aout,squirt_out_relocs)): Similarly use
7680 MY_swap_ext_reloc_out.
7681 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
7682
7683 2000-04-03 Kazu Hirata <kazu@hxi.com>
7684
7685 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
7686 the R_PCRWORD_B case.
7687
7688 2000-03-31 Thomas de Lellis <tdel@wrs.com>
7689
7690 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
7691 on some targets.
7692 * ihex.c : Ditto.
7693
7694 Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
7695
7696 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
7697 HOWTO references to bfd_elf_generic_reloc, that have
7698 partial_inplace == true, now use the new function. The function
7699 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
7700 extends its fixes to the R_M32R_{16,24,32} relocs.
7701 The new logic in m32r_elf_lo16_reloc() has been removed, and
7702 it instead calls the new routine to obtain that functionality.
7703
7704 2000-03-27 Alan Modra <alan@linuxcare.com.au>
7705
7706 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
7707 elf32_avr_check_relocs, avr_final_link_relocate,
7708 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
7709 elf32_avr_object_p): Add prototypes.
7710 (elf32_avr_gc_mark_hook): Add default for h->root.type.
7711 (bfd_elf_avr_final_write_processing): Make static.
7712
7713 2000-03-27 Denis Chertykov <denisc@overta.ru>
7714
7715 * cpu-avr.c: New file. BFD support routines for AVR architecture.
7716 * archures.c (bfd_architecture): Add AVR architecture.
7717 (bfd_archures_list): Add reference to AVR architecture info.
7718 * elf.c (prep_headers): Handle bfd_arch_avr.
7719 * reloc.c: Add various AVR relocation enums.
7720 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
7721 list.
7722 * Makefile.am: Add support for AVR elf.
7723 * configure.in: Likewise.
7724 * config.bfd: Likewise.
7725 * Makefile.in: Regenerate.
7726 * configure: This too.
7727 * bfd-in2.h: And this.
7728 * libbfd.h: And this.
7729
7730 2000-03-24 H.J. Lu <hjl@gnu.org>
7731
7732 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
7733 (elf64_alpha_find_reloc_at_ofs): Likewise.
7734
7735 2000-03-17 Alan Modra <alan@linuxcare.com.au>
7736
7737 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
7738 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
7739 allowable range used to be -2**(n-1) to 2**n-1.
7740 * reloc.c (_bfd_relocate_contents): Same here. Also replace
7741 "boolean overflow" with "bfd_reloc_status_type flag".
7742
7743 2000-03-14 Doug Evans <dje@casey.transmeta.com>
7744
7745 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
7746
7747 2000-03-14 Kazu Hirata <kazu@hxi.com>
7748
7749 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
7750 of shrinks properly, including the last reloc.
7751
7752 2000-03-13 Kazu Hirata <kazu@hxi.com>
7753
7754 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
7755 check for R_MOVL2.
7756
7757 2000-03-11 Alan Modra <alan@linuxcare.com.au>
7758
7759 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
7760 a format mismatch rather than an "error" from bfd_read such as
7761 bfd_error_file_truncated.
7762
7763 2000-03-10 Geoff Keating <geoffk@cygnus.com>
7764
7765 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
7766 sign-extension and big-endian compensation for
7767 R_MIPS_64 even in ld -r.
7768
7769 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
7770
7771 * elf32-mips.c (mips_elf_next_relocation): Rename from
7772 mips_elf_next_lo16_relocation, and generalize to look
7773 for any relocation type.
7774 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
7775 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
7776 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
7777 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
7778 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
7779 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
7780 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
7781 (mips_rtype_to_howto): Likewise.
7782 (mips_elf_calculate_relocation): Handle new relocs.
7783 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
7784 are paired. The addend for R_MIPS_GNU_REL16_S2
7785 is shifted right two bits.
7786
7787 2000-03-10 Alan Modra <alan@linuxcare.com.au>
7788
7789 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
7790 comment, and ensure it doesn't happen again.
7791 (bfd_install_relocation): Same here.
7792 (_bfd_relocate_contents): Don't bother assigning unused signmask
7793 shift result. Fix typos in comments.
7794 Remove trailing whitespace throughout file.
7795
7796 2000-03-07 Doug Evans <dje@casey.transmeta.com>
7797
7798 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
7799 * bfd-in2.h: Rebuild.
7800
7801 2000-03-06 Nick Clifton <nickc@cygnus.com>
7802
7803 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
7804 sym_ptr_ptr fields.
7805 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
7806 (SIZEOF_ILF_STRINGS): Redefine.
7807 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
7808 relative reloc, as opposed to a section relative reloc.
7809 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
7810 not C_LABEL.
7811 Add length of symbol's prefix to string pointer.
7812 Store a pointer to the symbol in the symbol pointer table.
7813 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
7814 Initialise the symbol pointer table.
7815 Store the hint in the Hint/Name table.
7816 Make the jump reloc be symbol realtive, not section relative.
7817 Create an import symbol for imported code.
7818
7819 2000-03-06 Catherine Moore <clm@cygnus.com>
7820
7821 * elf.c (swap_out_syms): Check for null type_ptr.
7822
7823 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
7824
7825 * aout-target.h (MY(write_object_contents)): Remove unused
7826 and unusable "#if CHOOSE_RELOC_SIZE".
7827 * pc532-mach.c (MY(write_object_contents)): Ditto.
7828 * netbsd.h (MY(write_object_contents)): Ditto.
7829 * hp300hpux.c (MY(write_object_contents)): Ditto.
7830 * freebsd.h (MY(write_object_contents)): Ditto.
7831 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
7832
7833 2000-02-29 H.J. Lu <hjl@gnu.org>
7834
7835 * peicode.h (jtab): Make it static.
7836
7837 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
7838 defined and COFF_IMAGE_WITH_PE is not defined.
7839 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
7840 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
7841
7842 2000-03-01 Nick Clifton <nickc@cygnus.com>
7843
7844 * coff-arm.c (bfd_arm_process_before_allocation): Make
7845 'symndx' signed to prevent compile time warning.
7846
7847 * coff-mcore.c: Remove unused prototype for pe_object_p.
7848
7849 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
7850 functions that are not used when COFF_IMAGE_WITH_PE is
7851 defined.
7852 (struct sh_opcode): Change type of 'flags' field to unsigned
7853 long so that it can hold the USESAS flag.
7854
7855 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
7856
7857 * elf-m10300.c (mn10300_elf_relax_section): Initialise
7858 'sym_sec'.
7859
7860 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
7861 parameters.
7862 Remove unusued variables and code.
7863 (elf_backend_add_symbol_hook): Fix prototype.
7864
7865 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
7866 'srelgot'.
7867
7868 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
7869 'oldinst'.
7870
7871 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
7872 parameters.
7873 Remove unusued variables and code.
7874 (elf_backend_add_symbol_hook): Fix prototype.
7875
7876 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
7877
7878 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
7879 to unused function parameter.
7880
7881 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
7882 parameters.
7883 Use EMPTY_HOWTO to initialise empty howto slots.
7884 Remove unused variables.
7885
7886 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
7887
7888 2000-03-01 H.J. Lu <hjl@gnu.org>
7889
7890 * aoutx.h (aout_link_input_section_std): Pass "true" to
7891 the undefined_symbol callback.
7892 (aout_link_input_section_ext): Likewise.
7893 * bout.c (get_value): Likewise.
7894 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
7895 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
7896 Likewise.
7897 (alpha_relocate_section): Likewise.
7898 * coff-arm.c (coff_arm_relocate_section): Likewise.
7899 * coff-i960.c (coff_i960_relocate_section): Likewise.
7900 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
7901 * coff-mips.c (mips_relocate_section): Likewise.
7902 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
7903 * coff-sh.c (sh_relocate_section): Likewise.
7904 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
7905 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
7906 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
7907 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7908 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7909 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7910 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7911 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7912 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7913 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7914 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7915 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7916 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7917 * elflink.h (elf_link_output_extsym): Likewise.
7918 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
7919 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
7920 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
7921
7922 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
7923 undefined_symbol callback when building shared library with
7924 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
7925 "true".
7926 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7927 * elf32-i386.c (elf_i386_relocate_section): Likewise.
7928 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7929 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7930 (elf32_mips_get_relocated_section_content): Likewise.
7931 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7932 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7933 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7934 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7935
7936 2000-02-28 Nick Clifton <nickc@cygnus.com>
7937
7938 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
7939 * Makefile.in: Regenerate.
7940
7941 * configure.in: Add support for mips and sh pe vectors.
7942 * configure: regenerate.
7943
7944 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
7945 targets.
7946
7947 * targets.c: Add mips and sh pe vectors.
7948
7949 * libpei.h (coff_final_link_postscript): Only define if not
7950 already defined.
7951
7952 * coffcode.h: Add support for WinCE magic numbers.
7953
7954 * peigen.c (pe_print_reloc): Update comment and rearrange
7955 appending of newline character.
7956
7957 * peicode.h: Add support for Image Library Format.
7958 (pe_ILF_vars): Structure containing data used by ILF code.
7959 (pe_ILF_make_a_section): New function. Create a section based
7960 on ILF data.
7961 (pe_ILF_make_a_reloc): New function. Create a reloc based on
7962 ILF data.
7963 (pe_ILF_make_a_symbol): New function. Create a symbol based
7964 on ILF data.
7965 (pe_ILF_save_relocs): New function. Store the relocs created
7966 by pe_ILF_make_a_reloc in a section.
7967 (pe_ILF_build_a_bfd): New function. Create a BFD describing
7968 an ILF object.
7969 (pe_ILF_object_p): New function. Return a bfd_target pointer
7970 for an ILF object.
7971 (pe_bfd_object_p): If an ILF object is detected call
7972 pe_ILF_object_p on it.
7973
7974 * coff-arm.c: Add support for WinCE relocs which are different
7975 from normal ARM COFF relocs.
7976 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
7977
7978 * coff-sh.c: Add support for sh-pe target.
7979 * pe-sh.c: New file. Support code for sh-pe target.
7980 * pei-sh.c: New file. Support code for sh-pe target.
7981
7982 * pe-mips.c: New file. Support code for mips-pe target.
7983 * pei-mips.c: New file. Support code for mips-pe target.
7984
7985 2000-02-27 Jakub Jelinek <jakub@redhat.com>
7986
7987 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
7988 architecture if the object causing the bump is dynamic.
7989 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
7990 and also don't it for memory ordering.
7991 (sparc64_elf_write_relocs): Take src_rela out of the loop.
7992
7993 2000-02-27 Ian Lance Taylor <ian@zembu.com>
7994
7995 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
7996 calling bfd_get_section_size_before_reloc.
7997 (decode_line_info): Likewise.
7998 (_bfd_dwarf2_find_nearest_line): Likewise.
7999
8000 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
8001
8002 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
8003 name of the libtool directory.
8004 * Makefile.in: Rebuild.
8005
8006 Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
8007
8008 * som.c (SOM_HOWTO): Define.
8009 (som_hppa_howto_table): Use it.
8010
8011 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
8012
8013 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
8014
8015 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
8016
8017 2000-02-24 Catherine Moore <clm@cygnus.com>
8018
8019 * som.c (som_misc_symbol_info): Add field
8020 secondary_def.
8021 (som_bfd_derive_misc_symbol_info): Initialize
8022 secondary_def.
8023 (som_build_and_write_symbol_table): Keep track
8024 of secondary_def field.
8025 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
8026 if secondary_def field is set.
8027 (som_bfd_ar_write_symbol_stuff): Initialize
8028 secondary_def.
8029
8030 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
8031
8032 * dwarf2.c (read_address): Read 16-bits addresses.
8033 (parse_comp_unit): Accept addr_size == 2.
8034
8035 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
8036
8037 * bfd-in.h: Update copyright date.
8038
8039 2000-02-23 Linas Vepstas <linas@linas.org>
8040
8041 * cpu-i370.c: New file.
8042 * elf32-i370.c: New file.
8043 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
8044 (bfd_i370_arch): New.
8045 (bfd_archures_list): Add bfd_i370_arch.
8046 * elf.c (prep_headers): Add bfd_arch_i370.
8047 * Makefile.am: Add support for IBM 370 elf.
8048 * config.bfd: Likewise.
8049 * configure.in: Likewise.
8050 * libbfd.h (bfd_reloc_code_real_names): Likewise.
8051 * reloc.c (bfd_reloc_code_type): Likewise.
8052 * targets.c: Likewise.
8053
8054 * Makefile.in: Regenerate.
8055 * configure: Regenerate.
8056 * bfd-in2.h: Regenerate.
8057
8058 2000-02-22 Ian Lance Taylor <ian@zembu.com>
8059
8060 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
8061 invalid relocation types, and change them to R_386_NONE.
8062
8063 2000-02-22 H.J. Lu <hjl@gnu.org>
8064
8065 * elflink.h (elf_link_add_object_symbols): If a version symbol is
8066 not defined, don't add a second ELF_VER_CHR.
8067
8068 * elflink.h (elf_bfd_final_link): Call output_extsym for global
8069 symbols converted to local symbols even when stripping all
8070 symbols.
8071 (elf_link_output_extsym): Process global symbols converted to
8072 local symbols even if they are being stripped.
8073
8074 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
8075
8076 * archures.c (bfd_octets_per_byte): Return unsigned int.
8077 (bfd_arch_mach_octets_per_byte): Ditto.
8078 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
8079 comparison warning.
8080 * section.c (bfd_get_section_size_before_reloc): Quell signed
8081 vs. unsigned comparison warning.
8082 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
8083 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
8084 change. What was I thinking?
8085 * bfd-in2.h: Regenerate.
8086
8087 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
8088 (elf_gc_sections): Same here.
8089 (elf_gc_common_finalize_got_offsets): And here.
8090
8091 2000-02-21 Ian Lance Taylor <ian@zembu.com>
8092
8093 ELF HPPA doesn't work at present; remove it until it does.
8094 * config.bfd: Comment out setting targ_defvec to
8095 bfd_elf32_hppa_vec.
8096 * Makefile.am: Rebuild dependencies.
8097 (BFD32_BACKENDS): Remove elf32-hppa.lo.
8098 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
8099 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
8100 * Makefile.in: Rebuild.
8101 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
8102
8103 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8104
8105 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
8106 is no bfd_free(). Revert bfd_free part of previous change.
8107
8108 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8109
8110 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
8111 arrays.
8112 (coff_compute_section_file_positions): Use bfd_free to pair
8113 bfd_malloc.
8114 (coff_write_object_contents): Likewise.
8115
8116 * coff-rs6000.c (xcoff_howto_table_16): New variable.
8117 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8118
8119 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
8120
8121 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
8122 (xcoff_ar_file_hdr_big): New structure.
8123 (SIZEOF_AR_FILE_HDR_BIG): New macro.
8124 (xcoff_ar_hdr_big): New structure.
8125 (SIZEOF_AR_HDR_BIG): New macro.
8126 (xcoff_big_format_p): New macro.
8127 (xcoff_ardata_big): New macro.
8128 (arch_xhdr_big): New macro.
8129 (xcoff_slurp_armap): Handle large archives.
8130 (xcoff_archive_p): Detect large archives.
8131 (xcoff_read_ar_hdr): Handle large archives.
8132 (xcoff_openr_next_archived_file): Handle large archives.
8133 (xcoff_generic_stat_arch_elt): Handle large archives.
8134 (xcoff_write_armap_old): Rename from xcoff_write_armap.
8135 (xcoff_write_armap_big): New function.
8136 (xcoff_write_armap): New function, dispatch to _old or _big.
8137 (xcoff_write_archive_contents_old): Rename from
8138 xcoff_write_archive_contents.
8139 (xcoff_write_archive_contents_big): New function.
8140 (xcoff_write_archive_contents): New function, dispatch to _old or
8141 _big.
8142
8143 2000-02-18 Richard Henderson <rth@cygnus.com>
8144
8145 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
8146 and hide_symbol members.
8147 (elf_link_hash_copy_indirect): Remove.
8148 (elf_link_hash_hide_symbol): Remove.
8149 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
8150 and elf_backend_hide_symbol.
8151 (_bfd_elf_link_hash_copy_indirect): Declare.
8152 (_bfd_elf_link_hash_hide_symbol): Declare.
8153 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
8154 (_bfd_elf_link_hash_hide_symbol): Likewise.
8155 (_bfd_elf_link_hash_table_init): Don't init killed members.
8156 * elflink.h (elf_link_add_object_symbols): Use the bed function
8157 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
8158 (elf_link_assign_sym_version): Likewise.
8159 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
8160 (elf_backend_hide_symbol): Likewise.
8161 (elfNN_bed): Update for new members.
8162
8163 2000-02-17 Kevin Buettner <kevinb@redhat.com>
8164
8165 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
8166 STACK_END_ADDR): Define for new core file format.
8167 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
8168 for handling the vagaries of the various core file structures used
8169 by AIX over the years.
8170 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
8171 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
8172 core_dumpx structure.
8173
8174 Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8175
8176 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
8177 (bfd_mach_sh3_dsp): Likewise.
8178 (bfd_mach_sh4): Reinstate.
8179 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
8180 * bfd-in2.h: Regenerate.
8181 * coff-sh.c (struct sh_opcode): flags is no longer short.
8182 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
8183 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
8184 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
8185 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
8186 (sh_opcodes): No longer const.
8187 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
8188 (sh_insn_uses_reg): Check for USESAS and USESR8.
8189 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
8190 (_bfd_sh_align_load_span): Return early for SH4.
8191 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
8192 Take into account that field b of a parallel processing insn
8193 could be mistaken for a separate insn.
8194 * cpu-sh.c (arch_info_struct): New array elements for
8195 sh2, sh-dsp and sh3-dsp.
8196 Reinstate element for sh4.
8197 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
8198 (SH4_NEXT): Reinstate.
8199 (SH3_NEXT, SH3E_NEXT): Adjust.
8200 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
8201 * elf32-sh.c (sh_elf_set_private_flags): New function.
8202 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
8203 (sh_elf_merge_private_data): New function.
8204 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
8205 (bfd_elf32_bfd_copy_private_bfd_data): Define.
8206 (bfd_elf32_bfd_merge_private_bfd_data): Change to
8207 sh_elf_merge_private_data.
8208
8209 2000-02-13 Richard Henderson <rth@cygnus.com>
8210
8211 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
8212 hide_symbol members.
8213 (elf_link_hash_copy_indirect): New.
8214 (elf_link_hash_hide_symbol): New.
8215 * elflink.h (elf_link_add_object_symbols): Break out copy from
8216 indirect new new symbol to elf.c.
8217 (elf_link_assign_sym_version): Break out privatization of
8218 non-exported symbol to elf.c.
8219 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
8220 (_bfd_elf_link_hash_hide_symbol): New.
8221 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
8222
8223 2000-02-13 Ian Lance Taylor <ian@zembu.com>
8224
8225 * section.c (_bfd_strip_section_from_output): Add info parameter.
8226 If it passed as non-NULL, use it to check whether any input BFD
8227 has an input section which uses this output section. Change all
8228 callers.
8229 * bfd-in2.h: Rebuild.
8230
8231 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
8232 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
8233 1999-11-29.
8234 * bfd-in2.h: Rebuild.
8235
8236 2000-02-10 Timothy Wall <twall@cygnus.com>
8237
8238 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
8239 allow final modifications of swapped-in symbol.
8240 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
8241 * coffcode.h (coff_write_relocs): Use macro
8242 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
8243 symbol index should be set to -1.
8244
8245 Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
8246
8247 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
8248 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
8249 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
8250 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
8251 sh_insns_uses_or_sets_freg): New functions.
8252 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
8253 * (sh_insns_conflict): Use new functions and new macros to
8254 detect conflicts when two instructions both set same integer registers,
8255 both set same fp register, and both set special register.
8256
8257 2000-02-09 Timothy Wall <twall@cygnus.com>
8258
8259 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
8260 swapping in sections, so that the swapping routines have access to
8261 the arch/mach info.
8262
8263 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
8264
8265 * coff-go32.c: Update comment. Update copyright.
8266
8267 2000-01-27 Thomas de Lellis <tdel@windriver.com>
8268
8269 * syms.c (bfd_decode_symclass)
8270 Two new class characters were added - 'V' and 'v'. The
8271 meaning of 'W' is now restricted to just weak non-object
8272 symbols. This allows differentiation between, for example,
8273 weak functions vs weak objects. nm for example now dumps:
8274 'W' = weak global
8275 'w' = weak unresolved
8276 'V' = weak global object
8277 'v' = weak unresolved object
8278
8279 (bfd_is_undefined_symclass): New function. Return true if the
8280 given symbol class represents and undefined/unresolved symbol.
8281
8282 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
8283 unresolved symbols.
8284
8285 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
8286
8287 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
8288 STT_ARM_16BIT flag set, but it is not attached to a data object
8289 return STT_ARM_16BIT so that it will be treated as code by the
8290 disassembler.
8291
8292 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
8293
8294 * coff-i386.c (i3coff_object_p): Remove prototype.
8295 Update copyright.
8296
8297 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
8298 to name. Update copyright.
8299
8300 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
8301 assignment to avoid warning. Update copyright.
8302
8303 2000-01-24 Robert Lipe (robertl@sco.com)
8304
8305 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
8306 instead of using GNU C extension.
8307
8308 2000-01-21 Nick Clifton <nickc@cygnus.com>
8309
8310 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
8311 amount from a bfd_in_memory structure.
8312 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
8313 structure.
8314
8315 2000-01-14 Nick Clifton <nickc@cygnus.com>
8316
8317 * linker.c (default_indirect_link_order): oops - fix incorrectly
8318 applied patch from Tim Wall.
8319
8320 2000-01-13 Timothy Wall (twall@tiac.net>
8321
8322 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
8323 = scnhsz, filhsz, relsz, aoutsz, etc)
8324
8325 * coffswap.h: Ditto.
8326
8327 2000-01-13 Nick Clifton <nickc@cygnus.com>
8328
8329 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
8330 interwork thumb to arm stub.
8331
8332 2000-01-13 Timothy Wall (twall@tiac.net>
8333
8334 * archures.c (bfd_octets_per_byte): New function: Return
8335 target byte size.
8336 (bfd_arch_mach_octets_per_byte): New function: Return target
8337 byte size.
8338
8339 * section.c: Distinguish between octets and bytes for usage of
8340 _cooked_size, _raw_size, and output_offset. Clarify
8341 description of bfd_set_section_contents.
8342
8343 * bfd-in2.h: Regenerate.
8344
8345 * coffgen.c: Indicate that the offset parameter is in bytes, not
8346 octets.
8347
8348 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
8349 where appropriate to get the octet offset when calling
8350 bfd_set_section_contents.
8351 (bfd_coff_reloc_link_order): Ditto.
8352
8353 * linker.c (bfd_generic_reloc_link_order): Ditto.
8354 (_bfd_default_link_order): Ditto.
8355
8356 * reloc.c (bfd_perform_relocation): Distinguish between octets
8357 and bytes. Use octets when indexing into octet data; use bytes
8358 when calculating target addresses.
8359 (bfd_install_relocation): Ditto.
8360
8361 * srec.c (srec_write_section): Ditto.
8362
8363 2000-01-13 Nick Clifton <nickc@cygnus.com>
8364
8365 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
8366 3 to 2. This allows 4 byte sized sections, which is necessary for
8367 dlltool to build functioning DLLs.
8368
8369 2000-01-10 Philip Blundell <pb@futuretv.com>
8370
8371 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
8372 (arm*-*-conix*): New target.
8373
8374 2000-01-10 Egor Duda <deo@logos-m.ru>
8375
8376 * config.bfd: Include elf32_i386 vector to target list for cygwin
8377 and mingw.
8378
8379 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
8380 * configure.in: Test for structure win32_pstatus_t in
8381 <sys/procfs.h>
8382 * configure: Regenerate.
8383
8384 * elf.c (elfcore_grok_win32pstatus): New function: process
8385 win32_pstatus_t notes in elf core file.
8386 (elfcore_grok_note): Detect win32_pstatus notes.
8387
8388 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8389
8390 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
8391 visibility.
8392 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
8393 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
8394
8395 For older changes see ChangeLog-9899
8396 \f
8397 Local Variables:
8398 mode: change-log
8399 left-margin: 8
8400 fill-column: 74
8401 version-control: never
8402 End:
This page took 0.208139 seconds and 4 git commands to generate.