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