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