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