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