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