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