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