1 2001-10-23 H.J. Lu <hjl@gnu.org>
3 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
4 m != NULL before accessing it.
6 2001-10-23 Alan Modra <amodra@bigpond.net.au>
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.
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.
22 From Herbert Xu <herbert@gondor.apana.org.au>
23 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
26 2001-10-22 H.J. Lu <hjl@gnu.org>
28 * configure.in (WIN32LIBADD): Use -L../libiberty for
32 2001-10-21 H.J. Lu <hjl@gnu.org>
34 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
35 if shared library is enabled only for Linux hosts.
38 2001-10-21 H.J. Lu <hjl@gnu.org>
40 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
41 ../libiberty/Makefile instead of $enable_shared.
44 2001-10-21 H.J. Lu <hjl@gnu.org>
46 * elf32-cris.c (cris_reloc_type_lookup): Use int for index.
48 2001-10-20 H.J. Lu <hjl@gnu.org>
50 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
51 if shared library is enabled.
54 2001-10-20 H.J. Lu <hjl@gnu.org>
56 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
58 2001-10-19 H.J. Lu <hjl@gnu.org>
60 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
63 2001-10-18 H.J. Lu <hjl@gnu.org>
65 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
66 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
68 2001-10-18 Jakub Jelinek <jakub@redhat.com>
70 * section.c (_bfd_strip_section_from_output): Don't count
71 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
73 2001-10-17 Alan Modra <amodra@bigpond.net.au>
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.
87 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
89 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
92 2001-10-15 H.J. Lu <hjl@gnu.org>
94 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
95 for relocations against discarded link-once section.
97 2001-10-15 Alan Modra <amodra@bigpond.net.au>
99 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
100 bfd_reloc_outofrange and similar errors.
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.
110 2001-10-15 Alan Modra <amodra@bigpond.net.au>
111 H.J. Lu <hjl@gnu.org>
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.
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.
128 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
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
134 2001-10-10 Jakub Jelinek <jakub@redhat.com>
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.
139 2001-10-10 Kazu Hirata <kazu@hxi.com>
141 * aout-encap.c: Fix comment typos.
143 * archive.c: Likewise.
145 * coff64-rs6000.c: Likewise.
146 * coffcode.h: Likewise.
147 * coffgen.c: Likewise.
148 * cofflink.c: Likewise.
149 * coff-mips.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.
157 * section.c: Likewise.
160 * bfd-in2.h: Regenerate.
161 * libcoff.h: Likewise.
163 2001-10-10 Alan Modra <amodra@bigpond.net.au>
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.
171 2001-10-09 Alan Modra <amodra@bigpond.net.au>
173 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
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.
183 2001-10-09 Alan Modra <amodra@bigpond.net.au>
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.
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.
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.
212 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
214 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
216 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
218 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
221 2001-10-06 Alan Modra <amodra@bigpond.net.au>
223 * bfd.c (bfd_assert): Report bfd version.
224 (_bfd_abort): Likewise.
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.
230 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
233 2001-10-05 Jeff Law <law@redhat.com>
235 * som.h (som_exec_data): New field "version_id".
236 * som.c (som_object_setup): Record the version_id if it
238 (som_prep_headers): Do not initialize version_id here.
239 (som_finish_writing): Initialize version_id here.
241 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
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.
247 2001-10-04 Alan Modra <amodra@bigpond.net.au>
249 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
251 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
252 copying flags if this is a weakdef.
254 2001-10-04 Alan Modra <amodra@bigpond.net.au>
256 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
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.
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.
270 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
272 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
274 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
276 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
277 (elf_backend_default_use_rela_p): New define.
279 2001-10-03 Alan Modra <amodra@bigpond.net.au>
281 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
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.
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.
305 2001-10-02 Alan Modra <amodra@bigpond.net.au>
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.
313 2001-10-02 Alan Modra <amodra@bigpond.net.au>
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
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.
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.
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.
362 * riscix.c: Likewise.
363 * sparclinux.c: Likewise.
364 * sparclynx.c: Likewise.
365 * sparcnetbsd.c: Likewise.
367 * targets.c: Likewise.
368 * vaxnetbsd.c: Likewise.
369 * vms-hdr.c: Likewise.
371 2001-10-01 Alan Modra <amodra@bigpond.net.au>
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.
380 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
381 Hans-Peter Nilsson <hp@bitrange.com>
383 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
384 partial_inplace, matching assembler output. Set src_mask to
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.
393 2001-09-30 Alan Modra <amodra@bigpond.net.au>
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.
399 2001-09-29 Alan Modra <amodra@bigpond.net.au>
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.
413 2001-09-29 Alan Modra <amodra@bigpond.net.au>
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.
476 2001-09-29 Alan Modra <amodra@bigpond.net.au>
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
492 (elf_backend_can_refcount): Define.
493 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
495 (elf32_hppa_copy_indirect_symbol): Make static to agree with
497 (elf_backend_can_refcount): Define.
498 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
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
508 (elf_backend_can_refcount): Define.
509 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
511 (elf_backend_can_refcount): Define.
512 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
514 (elf_backend_can_refcount): Define.
515 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
517 (elf_backend_can_refcount): Define.
518 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
520 (elf_backend_can_refcount): Define.
522 * som.c (som_write_symbol_strings): Cast current_offset in
523 bfd_seek call to match param type.
525 2001-09-28 J. Brobecker <brobecker@gnat.com>
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.
531 2001-09-28 Richard Henderson <rth@redhat.com>
533 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
534 SEC_MERGE, SEC_STRINGS.
536 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
537 * bfd-in2.h: Rebuild.
539 2001-09-28 Alan Modra <amodra@bigpond.net.au>
541 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
542 reloc code using x86_64_reloc_map.
544 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
545 no longer allocate here. Localise some vars to blocks where they
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
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
566 (elf_i386_relocate_section): Likewise. Comment typo fix.
567 (elf_i386_finish_dynamic_sections): Migrate common code out of
569 (elf_backend_* defines): Sort.
571 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
572 without a reloc when symbol visibilty makes a function local.
574 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
576 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
577 conflicting float flags.
579 2001-09-26 Alan Modra <amodra@bigpond.net.au>
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
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
606 2001-09-26 Alan Modra <amodra@bigpond.net.au>
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.
612 2001-09-25 Jakub Jelinek <jakub@redhat.com>
614 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
617 2001-09-25 H.J. Lu <hjl@gnu.org>
619 * bfd-in2.h: Regenerated.
621 2001-09-25 Alan Modra <amodra@bigpond.net.au>
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.
630 2001-09-25 Alan Modra <amodra@bigpond.net.au>
632 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
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
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.
657 2001-09-25 Alan Modra <amodra@bigpond.net.au>
659 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
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.
675 2001-09-24 Alan Modra <amodra@bigpond.net.au>
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.
699 2001-09-22 John Reiser <jreiser@BitWagon.com>
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.
704 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
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.
715 2001-09-21 Alan Modra <amodra@bigpond.net.au>
717 * Makefile.am: Run "make dep-am".
718 * Makefile.in: Regenerate.
720 * aoutx.h: Formatting fixes.
721 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
723 * linker.c: Replace bfd_get_filename with bfd_archive_filename
726 2001-09-21 Alan Modra <amodra@bigpond.net.au>
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.
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.
771 * libbfd.c: Likewise.
773 * pe-mips.c: Likewise.
774 * peicode.h: Likewise.
776 * xcofflink.c: Likewise.
778 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
780 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
783 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
786 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
787 Consolidate error messages, and split long messages to two lines.
789 2001-09-20 John Reiser <jreiser@BitWagon.com>
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.
809 2001-09-18 Bruno Haible <haible@clisp.cons.org>
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
852 * vms-tir.c: Don't include <ctype.h>.
854 2001-09-18 Alan Modra <amodra@bigpond.net.au>
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.
882 * archive.c: Likewise.
883 * archures.c: Likewise.
884 * bfd-in.h: Likewise.
886 * binary.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.
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.
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.
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.
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.
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.
1032 * sparclinux.c: Likewise.
1033 * sparclynx.c: Likewise.
1035 * stabs.c: Likewise.
1036 * sunos.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.
1048 * xcofflink.c: Likewise.
1049 * bfd-in2.h: Regenerate.
1050 * libbfd.h: Regenerate.
1051 * libcoff.h: Regenerate.
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
1060 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1061 * aoutf1.h: Likewise.
1063 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1064 larger than unsigned long can represent.
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.
1075 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
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.
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.
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.
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.
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.
1160 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1162 (aix386_core_vec): Typo fix.
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.
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".
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,
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.
1195 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
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
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
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
1213 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1215 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1217 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
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
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".
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.
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.
1251 * coff64-rs6000.c: Group prototypes together.
1253 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1254 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
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.
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.
1274 * cpu-ia64-opc.c: Correct comment.
1276 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1278 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
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.
1291 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1292 insn and sym_value to ints.
1294 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1296 (elfcore_read_notes): Likewise.
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.
1305 * elf32-cris.c (add_dynamic_entry): Define macro.
1306 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
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.
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.
1341 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1342 (v850_elf_perform_relocation): Make "r_type" param unsigned.
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.
1347 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
1349 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
1351 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
1353 * elfxx-ia64.c (global_sym_index): Return a long.
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
1362 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
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.
1368 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
1370 * pc532-mach.c (MYNSX): Delete.
1371 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
1372 (write_object_contents): Correct prototype.
1374 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
1375 than unsigned short.
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.
1381 * som.c (som_fixup_formats): Add missing braces.
1382 (som_reloc_addend): Pass a bfd_vma for "addend".
1384 * srec.c (srec_write_record): Pass "type" as an unsigned int.
1385 (srec_write_symbols): Remove an unnecessary var.
1387 * targets.c (_bfd_target_vector): Sort entries. Sort externs
1389 * configure.in: Sort to match. Bump version number.
1390 * configure: Regenerate.
1392 * tekhex.c (move_section_contents): Assert offset == 0.
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.
1401 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
1403 * elflink.h (elf_link_input_bfd): Fix typo in error message.
1405 2001-09-17 H.J. Lu <hjl@gnu.org>
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
1411 (_bfd_dwarf1_find_nearest_line): Likewise.
1413 2001-09-14 Michael Rauch <mrauch@netbsd.org>
1415 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
1416 just like R_SPARC_32.
1418 2001-09-14 Kevin Lo <kevlo@openbsd.org>
1420 * configure.bfd: Add arm-openbsd target.
1422 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1424 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
1425 Add support for mips64.
1427 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
1429 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
1431 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1433 * elf.c (prep_headers): Get the machine code from the elf
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
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.
1456 2001-09-11 Richard Henderson <rth@redhat.com>
1458 * elf64-alpha.c (elf64_alpha_section_flags): New.
1459 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
1461 2001-09-11 Richard Henderson <rth@redhat.com>
1463 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
1464 apply HINT relocations against dynamic symbols.
1466 2001-09-11 H.J. Lu <hjl@gnu.org>
1468 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
1470 2001-09-09 Richard Henderson <rth@redhat.com>
1472 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
1474 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
1475 following a call to a near function.
1477 2001-09-08 Richard Henderson <rth@redhat.com>
1479 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
1480 relocation errors. Fail gp-relative relocations against
1483 2001-09-08 Alan Modra <amodra@bigpond.net.au>
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.
1491 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1493 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
1496 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1498 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
1500 (mips_elf64_howto_table_rel): Likewise.
1502 2001-09-05 Tom Rix <trix@redhat.com>
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.
1511 * bfd-in2.h : Regenerate.
1513 2001-09-04 Richard Henderson <rth@redhat.com>
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.
1527 2001-09-04 Jeff Law <law@redhat.com>
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.
1536 * elf32-h8300.c (special): New function.
1537 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
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.
1543 2001-09-01 Andreas Jaeger <aj@suse.de>
1545 * vms-tir.c: Add missing prototypes.
1546 * vms-hdr.c: Likewise.
1547 * vms-gsd.c: Likewise.
1548 * vms-misc.c: Likewise.
1550 2001-08-31 H.J. Lu <hjl@gnu.org>
1552 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
1553 with bad relocation.
1555 2001-08-31 Eric Christopher <echristo@redhat.com>
1556 Jason Eckhardt <jle@redhat.com>
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.
1566 2001-08-31 Jakub Jelinek <jakub@redhat.com>
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.
1572 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
1574 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
1575 recomputed addend during relocatable link if not USE_REL.
1577 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
1580 2001-08-30 H.J. Lu <hjl@gnu.org>
1582 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
1584 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
1585 relocations for weak definitions.
1587 2001-08-30 H.J. Lu <hjl@gnu.org>
1589 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
1590 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
1591 * Makefile.in: Rebuild.
1593 2001-08-30 H.J. Lu <hjl@gnu.org>
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.
1599 2001-08-29 Joel Sherrill <joel@OARcorp.com>
1601 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
1602 default from coff to elf.
1604 2001-08-29 Jeff Law <law@redhat.com>
1606 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
1608 (h8_reloc_map): Similarly.
1609 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
1610 Add support for PC relative relocations.
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.
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
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.
1627 2001-08-29 Tom Rix <trix@redhat.com>
1629 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
1630 does not follow a XTY_SD.
1632 2001-08-29 Alan Modra <amodra@bigpond.net.au>
1634 * targmatch.sed: Delete case statements.
1635 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
1638 Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
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.
1651 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
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.
1662 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
1664 * elf32-i386.c: Add missing prototypes.
1665 * elf32-ppc.c: Likewise.
1666 * elf32-sh-lin.c: Likewise.
1667 * elfarm-nabi.c: Likewise.
1669 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
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.
1688 2001-08-27 H.J. Lu <hjl@gnu.org>
1690 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
1692 (mips_elf_calculate_relocation): Create dynamic relocation for
1693 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
1696 2001-08-27 H.J. Lu <hjl@gnu.org>
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.
1706 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
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.
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>
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.
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.
1737 2001-08-27 Andreas Schwab <schwab@suse.de>
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.
1746 2001-08-27 Andreas Jaeger <aj@suse.de>
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.
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.
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.
1769 2001-08-26 Andreas Jaeger <aj@suse.de>
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.
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.
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.
1792 2001-08-25 Andreas Jaeger <aj@suse.de>
1794 * oasys.c: Add missing prototypes.
1796 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
1797 attribute for parameter.
1798 * elf.c (_bfd_elf_reloc_type_class): Likewise.
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.
1805 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
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.
1826 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1828 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
1829 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
1831 2001-08-24 H.J. Lu <hjl@gnu.org>
1833 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
1836 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
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
1843 (elf_link_create_dynamic_sections): Fail if not using an ELF
1845 (elf_add_dynamic_entry): Fail if not using an ELF hash
1847 (elf_link_record_local_dynamic_symbol): Fail if not using an
1849 (size_dynamic_sections): Fail if not using an ELF hash
1851 (elf_adjust_dynamic_symbol): Fail if not using an ELF
1853 (elf_bfd_final_link): Fail if not using an ELF hash
1856 2001-08-24 H.J. Lu <hjl@gnu.org>
1858 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
1859 table is not an ELF linker hash table.
1861 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
1862 table type to bfd_link_elf_hash_table.
1864 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
1867 * linker.c (_bfd_link_hash_table_init): Set the linker hash
1868 table type to bfd_link_generic_hash_table.
1870 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1872 * bfd.c (bfd_alt_mach_code): New function.
1873 * bfd-in2.h: Rebuilt.
1875 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1877 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
1878 `type' field in the hash entry when deciding whether to follow a
1881 2001-08-24 Jakub Jelinek <jakub@redhat.com>
1883 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
1885 (elf_link_sort_relocs): Adjust accordingly.
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
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.
1898 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1900 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
1903 2001-08-23 Andreas Jaeger <aj@suse.de>
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.
1912 2001-08-23 H.J. Lu <hjl@gnu.org>
1914 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
1915 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
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.
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.
1936 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
1938 * aoutf1.h (sunos_write_object_contents): Silence compile time
1940 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
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.
1953 2001-08-23 Jakub Jelinek <jakub@redhat.com>
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
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
1994 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
1996 * configure.in (x86-bsdi): No corefile support.
1997 * configure: Regenerate.
1999 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2001 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2004 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
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.
2010 2001-08-20 Andreas Jaeger <aj@suse.de>
2012 * coff-sparc.c: Add missing prototypes.
2013 * elf32-s390.c: Likewise.
2014 * elf32-i960.c: Likewise.
2015 * aout-target.h: Likewise.
2017 2001-08-20 H.J. Lu <hjl@gnu.org>
2019 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2020 (elf_num_section_syms): New for num_section_syms.
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.
2026 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
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.
2032 2001-08-20 Alan Modra <amodra@bigpond.net.au>
2034 * archive.c (offsetof): Remove define.
2037 * sysdep.h (offsetof): Define.
2039 2001-08-17 Alan Modra <amodra@bigpond.net.au>
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.
2049 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2051 * linker.c (default_fill_link_order): Handle four byte fill value.
2053 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2055 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2057 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
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.
2064 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
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.
2086 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2088 * config.bfd (targ64_selvecs): New.
2089 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
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.
2100 2001-08-17 Alan Modra <amodra@bigpond.net.au>
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
2113 * bfd-in2.h: Regenerate.
2115 2001-08-15 Alan Modra <amodra@bigpond.net.au>
2117 * libieee.h (common_header_type): Add last_byte field.
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.
2126 (ieee_pos): Pass in ieee_data_struct rather than bfd.
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.
2144 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
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.
2151 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2153 * elf32-v850.c: Add missing function prototypes.
2154 Fix some formatting.
2156 * cpu-v850.c: Add missing function prototype.
2157 Fix some formatting.
2159 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
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
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.
2179 2001-08-10 Andreas Jaeger <aj@suse.de>
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.
2187 2001-08-10 Andreas Jaeger <aj@suse.de>
2189 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2190 Add prototypes where needed.
2192 2001-08-10 H.J. Lu <hjl@gnu.org>
2194 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2195 (bfd_fprintf_vma): Likewise.
2197 2001-08-10 H.J. Lu <hjl@gnu.org>
2199 * bfd.c (bfd_sprintf_vma): Don't return void.
2200 (bfd_fprintf_vma): Likewise.
2202 2001-08-10 Andreas Jaeger <aj@suse.de>
2204 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2206 * configure: Regenerate.
2208 2001-08-10 Alan Modra <amodra@bigpond.net.au>
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.
2214 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
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
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.
2243 2001-08-09 H.J. Lu <hjl@gnu.org>
2245 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2246 (bfd_elf_fprintf_vma): Likewise.
2248 2001-08-09 H.J. Lu <hjl@gnu.org>
2250 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2253 * bfd-in2.h: Regenerated.
2255 2001-08-09 H.J. Lu <hjl@gnu.org>
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.
2264 * bfd.c (bfd_sprintf_vma): New. Defined.
2265 (bfd_fprintf_vma): Likewise.
2267 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2268 (bfd_elf_fprintf_vma): Likewise.
2270 2001-08-09 Alan Modra <amodra@bigpond.net.au>
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.
2291 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2293 * bfd.c: Fix formatting.
2294 * bfd-in2.h: Regenerate.
2296 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
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).
2302 2001-08-08 Alan Modra <amodra@bigpond.net.au>
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.
2311 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
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.
2319 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
2321 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2322 targets as well as sh-pe.
2324 2001-08-03 Ben Harris <bjh21@netbsd.org>
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
2330 2001-08-03 Alan Modra <amodra@bigpond.net.au>
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
2336 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2338 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
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.
2345 2001-08-01 Adam Nemet <anemet@lnxw.com>
2347 * elf.c (elf_sort_sections): Return zero only as the last step.
2349 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
2351 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
2353 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
2354 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
2357 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2359 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
2360 to match corresponding bfd_coff_backend data member.
2362 2001-07-24 Alan Modra <amodra@bigpond.net.au>
2364 * Makefile.am: Update dependencies with "make dep-am".
2365 * Makefile.in: Regenerate
2367 2001-07-15 H.J. Lu <hjl@gnu.org>
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.
2373 2001-07-11 H.J. Lu <hjl@gnu.org>
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.
2379 2001-07-11 Steve Ellcey <sje@cup.hp.com>
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
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.
2392 2001-07-11 Jakub Jelinek <jakub@redhat.com>
2394 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
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
2404 2001-07-11 H.J. Lu <hjl@gnu.org>
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.
2410 2001-07-05 Jim Wilson <wilson@redhat.com>
2412 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
2413 the section of the bigger symbol.
2415 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
2417 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
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
2424 2001-07-04 H.J. Lu <hjl@gnu.org>
2426 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
2427 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
2430 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
2432 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
2434 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
2435 sections being discarded.
2437 2001-06-30 Alan Modra <amodra@bigpond.net.au>
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.
2452 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
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.
2475 2001-06-29 H.J. Lu <hjl@gnu.org>
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.
2481 2001-06-29 Alan Modra <amodra@bigpond.net.au>
2483 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
2485 2001-06-27 Alan Modra <amodra@bigpond.net.au>
2487 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
2489 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
2490 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
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
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.
2510 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
2512 (elf_i386_adjust_dynamic_symbol): ..nor here..
2513 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
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.
2519 2001-06-25 Alan Modra <amodra@bigpond.net.au>
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.
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.
2532 2001-06-24 H.J. Lu <hjl@gnu.org>
2534 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
2535 strncasecmp/strcasecmp instead of strncmp/strcmp.
2537 2001-06-23 H.J. Lu <hjl@gnu.org>
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
2544 2001-06-23 Alan Modra <amodra@bigpond.net.au>
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.
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.
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
2559 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
2561 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
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
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.
2587 2001-06-20 Bo Thorsen <bo@suse.co.uk>
2589 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
2592 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2594 * configure.host (mips64-*-linux): Reformat.
2596 2001-06-21 Alan Modra <amodra@bigpond.net.au>
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
2604 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
2605 Tidy .got and .plt error checking.
2607 2001-06-20 Catherine Moore <clm@redhat.com>
2609 * elf-bfd.h (struct elf_backend_data):
2610 elf_backend_emit_relocs: New field: Function for emitting
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
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
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.
2634 2001-06-20 H.J. Lu <hjl@gnu.org>
2636 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
2637 allocate local .got space.
2639 2001-06-19 Andreas Jaeger <aj@suse.de>
2641 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
2644 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
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.
2654 2001-06-18 H.J. Lu <hjl@gnu.org>
2656 * elflink.h (elf_info_failed): Add a new field, verdefs.
2657 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
2659 (elf_export_symbol): Check eif->verdefs to decide if a symbol
2662 2001-06-17 H.J. Lu <hjl@gnu.org>
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
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
2674 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
2675 there is a relocation in the .rel.dyn section against a
2677 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
2680 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
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
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
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.
2694 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
2696 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
2697 section is going to follow it.
2699 2001-06-12 Catherine Moore <clm@redhat.com>
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.
2706 2001-06-10 Alan Modra <amodra@bigpond.net.au>
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.
2717 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
2718 * Makefile.in: Regenerate.
2719 * po/Make-in: Remove trailing tab.
2721 2001-06-09 Philip Blundell <philb@gnu.org>
2723 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
2725 (elf32_arm_plt_entry): Likewise.
2727 2001-06-08 H.J. Lu <hjl@gnu.org>
2729 * elf.c (swap_out_syms): Keep names for global section symbols.
2731 2001-06-07 H.J. Lu <hjl@gnu.org>
2733 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
2734 MIPS-based machines need it.
2736 2001-06-07 H.J. Lu <hjl@gnu.org>
2738 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
2741 * config.bfd: Remove ecoff from Linux/mips.
2743 2001-06-07 Andreas Jaeger <aj@suse.de>
2745 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
2747 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
2748 alignment of 8 for .rela sections; handle further relocations.
2750 2001-06-06 Christian Groessler <cpg@aladdin.de>
2752 * coff-z8k.c: Fix formatting.
2753 Fix howtos: howto->size was always 1.
2755 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2757 * configure.host (mips64*-*-linux*): Define.
2759 2001-06-05 Alan Modra <amodra@bigpond.net.au>
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.
2773 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
2775 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
2776 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
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.
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.
2803 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
2805 2001-06-02 H.J. Lu <hjl@gnu.org>
2807 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
2809 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
2811 2001-06-02 H.J. Lu <hjl@gnu.org>
2813 * aout-cris.c (MACHTYPE_OK): New. Defined.
2815 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
2817 * section.c (_bfd_strip_section_from_output): Handle NULL
2820 2001-06-02 H.J. Lu <hjl@gnu.org>
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.
2826 2001-06-02 H.J. Lu <hjl@gnu.org>
2828 * coff-ia64.c (ia64coff_object_p): Rewrite with
2829 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
2831 2001-06-01 Andreas Jaeger <aj@suse.de>
2833 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
2834 relocation, small reformatting.
2836 2001-05-29 Andreas Jaeger <aj@suse.de>
2838 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
2839 (elf64_x86_64_relocate_section): Likewise.
2841 2001-05-30 Alan Modra <amodra@one.net.au>
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
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.
2860 2001-05-28 Andreas Jaeger <aj@suse.de>
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.
2866 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2868 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
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.
2876 2001-05-28 Nicolas Pitre <nico@cam.org>
2878 * elf32-arm.h: fix PLT generation for big endian ARM
2880 2001-05-28 Alan Modra <amodra@one.net.au>
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.
2892 2001-05-28 Jeff Sturm <jsturm@one-point.com>
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.
2901 2001-05-25 H.J. Lu <hjl@gnu.org>
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.
2908 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
2911 2001-05-25 H.J. Lu <hjl@gnu.org>
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
2918 (pmac_xcoff_vec): Likewise.
2919 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2921 2001-05-25 Timothy Wall <twall@redhat.com>
2923 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
2924 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
2926 2001-05-25 H.J. Lu <hjl@gnu.org>
2928 * bfd-in2.h: Regenerated.
2929 * libcoff.h: Likewise.
2931 2001-05-25 Alan Modra <amodra@one.net.au>
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.
2943 2001-05-24 Tom Rix <trix@redhat.com>
2945 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
2946 xcoff-target.h not used to define rs6000 or ppc bfd.
2949 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
2952 * coff-rs6000.c : Many changes for 64 bit support. Move common
2953 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
2956 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
2957 linker now supported. Explictly define the rs6000coff64_vec.
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
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
2974 * config.bfd : add powerpc64-*-aix* target
2976 * libcoff-in.h : formatting
2978 * libcoff.h : move xcoff extern declarations to libxcoff.h
2980 * libxcoff.h : New file
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.
2987 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
2990 (xcoff_build_ldsyms) : handle special __rtinit symbol.
2992 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
2994 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
2997 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2999 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3000 * libbfd.h: Regenerate.
3001 * bfd-in2.h: Regenerate.
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
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.
3012 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
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.
3019 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
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.
3031 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3033 * bfdint.texi: Replace -oformat with --oformat.
3035 2001-05-21 Andreas Jaeger <aj@suse.de>
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.
3041 2001-05-18 H.J. Lu <hjl@gnu.org>
3043 * elflink.h (elf_link_add_object_symbols): Revert the last
3046 2001-05-17 Alan Modra <amodra@one.net.au>
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.
3052 2001-05-17 H.J. Lu <hjl@gnu.org>
3054 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3055 version definition to basename of the output filename.
3057 2001-05-17 H.J. Lu <hjl@gnu.org>
3059 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3060 basename of the bfd filename.
3062 2001-05-16 Alan Modra <amodra@one.net.au>
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.
3069 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
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.
3075 2001-05-12 Peter Targett <peter.targett@arccores.com>
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.
3081 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3083 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3085 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3087 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3089 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3090 to .gnu.linkonce.t.FOO text section.
3092 2001-05-11 Jakub Jelinek <jakub@redhat.com>
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
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.
3144 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3146 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3147 to be unsigned long, in order to match its use.
3149 2001-05-10 H.J. Lu <hjl@gnu.org>
3151 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3154 2001-05-09 H.J. Lu <hjl@gnu.org>
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'.
3160 2001-05-08 Ian Lance Taylor <ian@zembu.com>
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
3167 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
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
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.
3179 2001-05-04 Richard Henderson <rth@redhat.com>
3181 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3183 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3185 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3186 EF_ARM_HASENTRY if the start address is set.
3188 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3190 * targets.c (_bfd_target_vector_entries): Compute value based on
3191 the size of the _bfd_target_vector and not bfd_target_vector.
3193 2001-05-03 H.J. Lu <hjl@gnu.org>
3195 * elfcode.h: Include "libiberty.h".
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.
3202 2001-05-03 Andreas Jaeger <aj@suse.de>
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.
3225 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
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
3231 2001-04-30 H.J. Lu <hjl@gnu.org>
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.
3239 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3240 if the symbol has hidden or internal visibility.
3242 2001-04-30 Alan Modra <amodra@one.net.au>
3244 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3245 calls to undefined weak symbols.
3247 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
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.
3252 2001-04-27 Andreas Jaeger <aj@suse.de>
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
3261 2001-04-27 Sean McNeil <sean@mcneil.com>
3263 * config.bfd: Add arm-vxworks target.
3264 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3265 addend (fro VXworks targets).
3267 2001-04-26 H.J. Lu <hjl@gnu.org>
3269 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3272 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
3274 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3275 * bfd-in2.h: Regenerated.
3277 2001-04-24 Jakub Jelinek <jakub@redhat.com>
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
3290 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3291 for proper alignment.
3292 Pass alignment information to sec_merge_add.
3294 2001-04-24 Christian Groessler <cpg@aladdin.de>
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
3299 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
3301 * cpu-openrisc.c: New file.
3302 * elf32-openrisc.c: Likewise.
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.
3323 2001-04-23 Bo Thorsen <bo@suse.de>
3325 * elf64-x86-64.c: Add c++ vtable hack.
3326 Small whitespace and comment changes.
3328 2001-04-19 Andreas Jaeger <aj@suse.de>
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.
3335 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
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
3343 (cris_elf_check_relocs): Use variable r_type in all places rather
3344 than the original expression. Add default case in switch for
3346 (elf_cris_size_dynamic_sections): Iterate over
3347 elf_cris_discard_excess_program_dynamics when not creating shared
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.
3353 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
3355 * coffcode.h (coff_write_object_contents): Use
3356 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
3358 2001-04-14 H.J. Lu <hjl@gnu.org>
3360 * bfd-in2.h: Regenerate.
3362 2001-04-14 Jakub Jelinek <jakub@redhat.com>
3364 * section.c (STD_SECTION): Add entsize.
3366 2001-04-13 H.J. Lu <hjl@gnu.org>
3368 * section.c (SEC_MERGE): Define new flag for merging.
3369 (SEC_STRINGS): Likewise.
3370 (entsize): New field.
3372 2001-04-13 Roger Sayle <roger@metaphorics.com>
3374 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
3375 flag on pe-i386 targets.
3377 2001-04-13 Jakub Jelinek <jakub@redhat.com>
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
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
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
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.
3406 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3408 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
3409 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
3411 2001-04-05 Steven J. Hill <sjhill@cotw.com>
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
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.
3424 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
3425 little endian targets.
3426 (mips_elf_sym_is_global): Handle traditional targets.
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.
3433 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
3434 and bfd_elf64_tradlittlemips_vec.
3436 2001-04-05 David Mosberger <davidm@hpl.hp.com>
3438 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
3439 ordinary "progbits" section.
3441 2001-04-04 Alan Modra <alan@linuxcare.com.au>
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.
3446 2001-04-03 David Mosberger <davidm@hpl.hp.com>
3448 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
3450 2001-03-30 H.J. Lu <hjl@gnu.org>
3452 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
3453 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
3455 2001-03-26 H.J. Lu <hjl@gnu.org>
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.
3466 2001-03-23 Nick Clifton <nickc@redhat.com>
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
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
3480 * Makefile.in: Regenerate.
3481 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
3483 * configure: Regenerate.
3485 * po/Make-in: Replace occurrences of POTFILES with SRC-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.
3495 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
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
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
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
3525 (cris_elf_check_relocs): Set reference counts for GOT and PLT
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):
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.
3546 2001-03-21 Diego Novillo <dnovillo@redhat.com>
3548 (_bfd_mips_elf_relocate_section): Give a better error message when
3549 a relocation is not recognized.
3551 2001-03-21 Alan Modra <alan@linuxcare.com.au>
3553 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
3554 non-NULL before attempting to dereference.
3556 2001-03-20 H.J. Lu <hjl@gnu.org>
3558 * configure.in: Remove the redundent AC_ARG_PROGRAM.
3559 * configure: Rebuild.
3561 2001-03-20 Andreas Schwab <schwab@suse.de>
3563 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
3564 relocation value when resolving a reference from a debugging
3567 2001-03-16 Scott Thomason <SThomaso@hii.com>
3569 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
3570 (xcoff64_swap_sym_out): Fix syntax errors.
3572 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
3574 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
3576 2001-03-15 Alan Modra <alan@linuxcare.com.au>
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.
3588 2001-03-12 DJ Delorie <dj@redhat.com>
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.
3594 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
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.
3600 2001-03-11 Philip Blundell <philb@gnu.org>
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.
3605 2001-03-08 Nick Clifton <nickc@redhat.com>
3607 * Most files: Update copyright notices using Perl script created
3608 by Kevin Buettner <kevinb@redhat.com>.
3610 2001-03-07 Nick Clifton <nickc@redhat.com>
3612 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
3613 prior patch on ! defined OLD_ARM_ABI.
3615 2001-03-07 Andreas Jaeger <aj@suse.de>
3617 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
3618 some relocation values.
3620 2001-03-06 Nick Clifton <nickc@redhat.com>
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.
3628 2001-03-06 Nick Clifton <nickc@redhat.com>
3630 * coff-arm.c (coff_arm_reloc_type_lookup): Add
3631 BFD_RELOC_THUMB_PCREL_BLX.
3633 2001-03-06 Igor Shevlyakov <igor@windriver.com>
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
3641 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
3643 * configure.in: Add s390 target.
3644 * configure: Regenerate.
3646 2001-02-28 Andreas Jaeger <aj@suse.de>
3648 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
3651 2001-02-28 Philip Blundell <pb@futuretv.com>
3653 * elf32-arm.h: Update mentions of renamed EF_xx constants.
3654 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
3656 2001-02-27 H.J. Lu <hjl@gnu.org>
3658 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
3659 abfd->tdata.aout_data == NULL.
3661 2001-02-27 Alan Modra <alan@linuxcare.com.au>
3663 * elf32-hppa.c: Correct field selector in stub comments.
3664 (clobber_millicode_symbols): Formatting fix.
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.
3672 * Makefile.in: Regenerate.
3673 * doc/Makefile.in: This too.
3675 2001-02-26 Timothy Wall <twall@cygnus.com>
3677 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
3680 2001-02-26 Nick Clifton <nickc@redhat.com>
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.
3686 2001-02-26 H.J. Lu <hjl@gnu.org>
3688 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
3689 a warning for section flags we do not handle instead of
3692 2001-02-26 Andreas Jaeger <aj@suse.de>
3694 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
3696 2001-02-22 Timothy Wall <twall@cygnus.com>
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.
3707 2001-02-21 David Mosberger <davidm@hpl.hp.com>
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".
3713 2001-02-20 Andreas Jaeger <aj@suse.de>
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.
3718 2001-02-19 Jakub Jelinek <jakub@redhat.com>
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.
3724 2001-02-18 David O'Brien <obrien@FreeBSD>
3726 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
3727 FreeBSD/i386-CURRENT differently until I can figure out the needed
3729 * configure: Regenerate.
3730 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
3731 FreeBSD/PowerPC, and FreeBSD/sparc64.
3733 2001-02-18 lars brinkhoff <lars@nocrew.org>
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.
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.
3754 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
3756 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
3757 multiarch needs it).
3759 2001-02-18 H.J. Lu <hjl@gnu.org>
3761 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
3764 2001-02-18 Kazu Hirata <kazu@hxi.com>
3766 * vms-misc.c: Fix formatting.
3768 2001-02-16 Kazu Hirata <kazu@hxi.com>
3770 * vms.c: Fix formatting.
3772 2001-02-14 H.J. Lu <hjl@gnu.org>
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.
3778 2001-02-14 Nick Clifton <nickc@redhat.com>
3780 * ecoff.c (bfd_debug_section): Update to initialise new fields in
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.
3787 * Makefile.in: Regenerate.
3788 * configure: Regenerate.
3789 * po/POTFILES.in: Regenerate.
3790 * po/bfd.pot: Regenerate.
3792 2001-02-14 H.J. Lu <hjl@gnu.org>
3794 * libcoff-in.h (pe_tdata): Add members target_subsystem and
3795 force_minimum_alignment.
3797 2001-02-14 Bo Thorsen <bo@suse.de>
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.
3812 2001-02-13 Richard Henderson <rth@redhat.com>
3814 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
3815 and not user provided.
3817 2001-02-13 Kazu Hirata <kazu@hxi.com>
3819 * vms.c (vms_print_symbol): Remove unreachable code.
3821 * rs6000-core.c: Fix formatting.
3823 2001-02-13 David Mosberger <davidm@hpl.hp.com>
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.
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).
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
3863 * libcoff.h (pe_tdata): Add members target_subsystem and
3864 force_minimum_alignment.
3866 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
3868 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
3870 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
3873 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
3874 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
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.
3881 (pepigen.lo): List dependencies for pepigen.lo.
3883 2001-02-13 Alan Modra <alan@linuxcare.com.au>
3885 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
3886 $global$ referenced but not defined, set its value here.
3888 2001-02-09 Bo Thorsen <bo@suse.de>
3890 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
3892 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
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).
3898 2001-02-12 Jan Hubicka <jh@suse.cz>
3900 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
3902 2001-02-11 H.J. Lu <hjl@gnu.org>
3904 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
3907 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
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.
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
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.
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
3926 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
3927 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
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.
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
3940 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
3942 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
3943 * Makefile.in: Regenerate.
3945 2001-02-09 David Mosberger <davidm@hpl.hp.com>
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
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
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
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
3967 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
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.
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.
3981 2001-02-09 Nick Clifton <nickc@redhat.com>
3983 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
3984 ImageBase. This has already been done by coff_swap_hdr_in.
3986 2001-02-09 Jakub Jelinek <jakub@redhat.com>
3988 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
3990 2001-02-09 Jakub Jelinek <jakub@redhat.com>
3992 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
3993 (sparc64_elf_relocate_section): Likewise.
3995 2001-02-09 Mark Kettenis <kettenis@gnu.org>
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.
4001 2001-02-08 H.J. Lu <hjl@gnu.org>
4003 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4004 relocation entries for weak definitions when building DSO with
4007 2001-02-08 Richard Henderson <rth@redhat.com>
4009 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4010 before visibility. Locally defined protected symbols are not
4013 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
4015 * config.bfd: Enable coff64 for rs6000-*. Patch from
4016 <hzoli@austin.ibm.com>.
4018 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4020 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4021 found, do not attempt to find dwarf2 info before returning.
4023 2001-02-07 Jakub Jelinek <jakub@redhat.com>
4025 * elflink.h (is_global_symbol_definition): Rename to
4026 is_global_data_symbol_definition and have it reject function
4028 (elf_link_is_defined_archive_symbol): Use renamed function.
4030 2001-02-07 Todd Vierling <tv@wasabisystems.com>
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.
4039 2001-02-06 H.J. Lu <hjl@gnu.org>
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.
4045 2001-02-06 Nick Clifton <nickc@redhat.com>
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
4050 * Makefile.in: Regenerate.
4051 * po/bfd.pot: Regenerate.
4053 2001-02-06 H.J. Lu <hjl@gnu.org>
4055 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4057 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4058 external_PEI_IMAGE_hdr.
4060 2001-02-06 Kazu Hirata <kazu@hxi.com>
4062 * elf-m10200.c: Fix formatting.
4064 2001-02-04 Nick Clifton <nickc@redhat.com>
4066 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4067 rel, it will be handled later on.
4069 2001-02-02 Fred Fish <fnf@ninemoons.com>
4071 * Makefile.in: Fix typo.
4073 2001-02-01 Kazu Hirata <kazu@hxi.com>
4075 * elf-m10300.c: Fix formatting.
4077 2001-01-30 Alan Modra <alan@linuxcare.com.au>
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
4084 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4086 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4089 2001-01-26 Richard Henderson <rth@redhat.com>
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.
4096 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
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.
4105 2001-01-25 Kazu Hirata <kazu@hxi.com>
4107 * bfd-in2.h: Rebuild.
4108 * libbfd.h: Likewise.
4110 2001-01-23 H.J. Lu <hjl@gnu.org>
4112 * bfd-in2.h: Rebuild.
4114 2001-01-23 H.J. Lu <hjl@gnu.org>
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.
4119 2001-01-23 Kazu Hirata <kazu@hxi.com>
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.
4148 * aoutx.h: Fix formatting.
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.
4159 * hp300hpux.c: Likewise.
4160 * hppabsd-core.c: Likewise.
4161 * hpux-core.c: Likewise.
4163 2001-01-22 Bo Thorsen <bo@suse.de>
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.
4178 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4180 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4181 * Makefile.in: Regenerate.
4183 2001-01-21 Kazu Hirata <kazu@hxi.com>
4185 * coff-a29k.c: Fix formatting.
4187 2001-01-19 H.J. Lu <hjl@gnu.org>
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.
4194 2001-01-17 Bo Thorsen <bo@suse.de>
4196 * targets.c: Alphabetize list of xvecs.
4198 2001-01-14 Alan Modra <alan@linuxcare.com.au>
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
4206 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4207 * elf32-hppa.c: Include elf32-target.h again to support linux
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.
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.
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.
4230 * opncls.c (bfd_fdopenr): Add parens like the comment says around
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.
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.
4241 2001-01-13 Nick Clifton <nickc@redhat.com>
4243 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4246 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4249 2001-01-12 Alan Modra <alan@linuxcare.com.au>
4251 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4252 * configure: Regenerate.
4254 2001-01-11 Peter Targett <peter.targett@arccores.com>
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
4262 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4264 (arc_elf_final_write_processing) Likewise.
4265 (ELF_MACHINE_CODE) Use EM_ARC.
4267 2001-01-10 Nick Clifton <nickc@redhat.com>
4269 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4271 2001-01-07 Philip Blundell <philb@gnu.org>
4273 * README: Replace `bug-gnu-utils@gnu.org' with
4274 `bug-binutils@gnu.org'.
4276 2001-01-04 Kazu Hirata <kazu@hxi.com>
4278 * som.c: Fix formatting.
4280 2001-01-03 Kazu Hirata <kazu@hxi.com>
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.
4296 2001-01-02 Kazu Hirata <kazu@hxi.com>
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.
4310 2001-01-01 Kazu Hirata <kazu@hxi.com>
4312 * reloc.c: Fix formatting.
4313 * riscix.c: Likewise.
4314 * rs6000-core.c: Likewise.
4315 * xcoff-target.h: Likewise.
4317 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4319 * elfcode.h (elf_object_p): Also restore the bfd mach field on
4320 error, by calling bfd_default_set_arch_mach with incoming
4323 2000-12-26 Kazu Hirata <kazu@hxi.com>
4325 * vaxnetbsd.c: Fix formatting.
4326 * versados.c: Likewise.
4327 * vms-gsd.c: Likewise.
4328 * vms-hdr.c: Likewise.
4329 * vms-misc.c: Likewise.
4331 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
4333 * archive.c (coff_write_armap): Don't write more than symbol_count
4334 `archive_member_file_ptr's.
4336 2000-12-25 Kazu Hirata <kazu@hxi.com>
4338 * vms-tir.c: Fix formatting.
4340 2000-12-23 Kazu Hirata <kazu@hxi.com>
4342 * vms.c: Fix formatting.
4345 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
4347 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
4349 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
4351 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
4354 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
4356 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
4358 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
4360 * libbfd.c (bfd_get_bits): Added
4361 (bfd_put_bits): Likewise
4362 * bfd-in.h: Declared the above.
4363 * bfd-in2.h: Regenerated.
4365 2000-12-20 Kazu Hirata <kazu@hxi.com>
4367 * targets.c: Fix formatting.
4368 * tekhex.c: Likewise.
4369 * trad-core.c: Likewise.
4371 2000-12-19 Kazu Hirata <kazu@hxi.com>
4373 * sco5-core.c: Fix formatting.
4374 * section.c: Likewise.
4375 * sparclinux.c: Likewise.
4376 * sparclynx.c: Likewise.
4377 * sparcnetbsd.c: Likewise.
4379 * stabs.c: Likewise.
4380 * stab-syms.c: Likewise.
4381 * sunos.c: Likewise.
4383 * sysdep.h: Likewise.
4385 2000-12-18 Nick Clifton <nickc@redhat.com>
4387 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
4389 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
4390 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
4392 2000-12-18 Nick Clifton <nickc@redhat.com>
4394 * vms-misc.c (_bfd_vms_get_record): Add default case to
4397 2000-12-15 Miloslav Trmac <mitr@volny.cz>
4399 * elfcore.h (elf_core_file_p): Move to the start of the program
4400 headers before attempting to read them.
4402 2000-12-14 Kazu Hirata <kazu@hxi.com>
4404 * peigen.c: Fix formatting.
4408 2000-12-13 Kazu Hirata <kazu@hxi.com>
4410 * peigen.c: Fix formatting.
4412 2000-12-12 Jim Wilson <wilson@redhat.com>
4414 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
4416 2000-12-08 Mark Salter <msalter@redhat.com>
4418 * binary.c (binary_set_section_contents): Ignore sections
4421 2000-12-12 Kazu Hirata <kazu@hxi.com>
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.
4438 2000-12-10 Fred Fish <fnf@be.com>
4440 * elflink.h (elf_link_output_extsym): Don't complain about undefined
4441 symbols in shared objects if allow_shlib_undefined is true.
4443 2000-12-12 Nick Clifton <nickc@redhat.com>
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.
4451 2000-12-09 Nick Clifton <nickc@redhat.com>
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.
4460 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
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
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.
4492 2000-12-08 Kazu Hirata <kazu@hxi.com>
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.
4509 2000-12-07 Kazu Hirata <kazu@hxi.com>
4511 * elf32-ppc.c: Fix formatting.
4512 * elf64-x86-64.c: Likewise.
4514 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
4516 From Ralf Baechle <ralf@gnu.org>
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.
4522 2000-12-06 Kazu Hirata <kazu@hxi.com>
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.
4532 2000-12-05 Kazu Hirata <kazu@hxi.com>
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.
4541 2000-12-03 Kazu Hirata <kazu@hxi.com>
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.
4552 2000-12-01 Chris Demetriou <cgd@sibyte.com>
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
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
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.
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
4598 (_bfd_mips_elf_final_write_processing): Add case for
4601 2000-12-01 Joel Sherrill <joel@OARcorp.com>
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.
4607 2000-11-30 Jan Hubicka <jh@suse.cz>
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.
4624 2000-11-30 Kazu Hirata <kazu@hxi.com>
4626 * xcofflink.c: Fix formatting.
4628 2000-11-28 Kazu Hirata <kazu@hxi.com>
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.
4641 2000-11-27 Kazu Hirata <kazu@hxi.com>
4643 * aout-adobe.c: Fix formatting.
4644 * coff64-rs6000.c: Likewise.
4645 * coffgen.c: Likewise.
4646 * cofflink.c: Likewise.
4648 2000-11-27 Philip Blundell <pb@futuretv.com>
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
4655 * coffcode.h (coff_write_object_contents): No need to write out
4656 the string table if it's already been done.
4658 2000-11-22 Philip Blundell <pb@futuretv.com>
4660 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
4661 weak undefined symbols.
4663 2000-11-24 Nick Clifton <nickc@redhat.com>
4665 * archures.c (bfd_mach_arm_5TE): Define.
4666 (bfd_mach_arm+XScale): Define.
4667 * bfd-in2.h: Regenerate.
4669 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
4670 BFD_RELOC_ARM_PCREL_BLX.
4672 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
4673 XScale machine numbers.
4675 * config.bfd (xscale-elf): Add target.
4676 (xscale-coff): Add target.
4678 * cpu-arm.c: Add xscale machine name.
4679 Add v5t, v5te and XScale machine numbers.
4681 2000-11-23 Kazu Hirata <kazu@hxi.com>
4683 * aix386-core.c: Fix formatting.
4685 2000-11-22 Jim Wilson <wilson@redhat.com>
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
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.
4706 2000-11-21 Kazu Hirata <kazu@hxi.com>
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.
4722 2000-11-21 Nick Clifton <nickc@redhat.com>
4724 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
4725 remove possibility of infinite loop.
4727 2000-11-20 Kazu Hirata <kazu@hxi.com>
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.
4744 2000-11-17 H.J. Lu <hjl@gnu.org>
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
4752 2000-11-16 Richard Henderson <rth@redhat.com>
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.
4765 2000-11-16 Kazu Hirata <kazu@hxi.com>
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.
4799 2000-11-15 Kazu Hirata <kazu@hxi.com>
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.
4813 2000-11-15 Richard Henderson <rth@redhat.com>
4815 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
4816 section with the same ALLOC|LOAD flags as the source section.
4818 2000-11-14 Jakub Jelinek <jakub@redhat.com>
4820 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
4821 by STO_ALPHA constants.
4823 2000-11-14 Kazu Hirata <kazu@hxi.com>
4825 * coff-pmac.c: Fix formatting.
4826 * coff-ppc.c: Likewise.
4828 2000-11-13 H.J. Lu <hjl@gnu.org>
4830 * elflink.h (elf_link_add_object_symbols): Also add indirect
4831 symbols for common symbols with the default version.
4833 2000-11-09 Philip Blundell <pb@futuretv.com>
4835 * section.c (STD_SECTION): Set gc_mark flag.
4837 2000-11-11 Kazu Hirata <kazu@hxi.com>
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.
4845 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
4847 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
4849 2000-11-10 Kazu Hirata <kazu@hxi.com>
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.
4858 2000-11-09 Kazu Hirata <kazu@hxi.com>
4860 * archive.c: Fix formatting.
4861 * archures.c: Likewise.
4863 2000-11-07 Richard Henderson <rth@redhat.com>
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.
4870 2000-11-08 Kazu Hirata <kazu@hxi.com>
4872 * bfd-in.h: Fix formatting.
4873 * bfd-in2.h: Likewise.
4875 * binary.c: Likewise.
4877 * coff-a29k.c: Likewise.
4878 * coff-alpha.c: Likewise.
4879 * coff-apollo.c: Likewise.
4880 * coff-aux.c: Likewise.
4882 2000-11-07 Kazu Hirata <kazu@hxi.com>
4884 * aix386-core.c: Fix formatting.
4885 * aoutf1.h: Likewise.
4886 * aoutx.h: Likewise.
4887 * archures.c: Likewise.
4888 * armnetbsd.c: Likewise.
4890 2000-11-07 Alan Modra <alan@linuxcare.com.au>
4892 * coff-h8300.c (special): Adjust reloc address.
4894 2000-11-06 Steve Ellcey <sje@cup.hp.com>
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.
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.
4911 2000-11-06 Kazu Hirata <kazu@hxi.com>
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.
4921 2000-11-05 Philip Blundell <philb@gnu.org>
4923 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
4924 BFDs containing no sections to be merged, regardless of their flags.
4926 2000-11-04 Philip Blundell <philb@gnu.org>
4928 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
4929 if a relocation for an undefined symbol also results in an
4932 2000-11-06 Christopher Faylor <cgf@cygnus.com>
4934 * config.bfd: Add support for Sun Chorus.
4936 2000-11-05 David O'Brien <obrien@FreeBSD.org>
4938 * configure.in: Recognize alpha-*-freebsd*.
4939 * configure: Regenerate.
4941 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
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
4947 (srec_set_section_contents): If S3Forced is true, always generate
4949 (srec_write_section): Use 'Chunk' to limit maximum length of S
4952 2000-11-02 Per Lundberg <plundis@chaosdev.org>
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.
4959 2000-10-31 Philip Blundell <philb@gnu.org>
4961 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
4962 EF_SOFT_FLOAT if it is defined.
4964 2000-10-27 Philip Blundell <philb@gnu.org>
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.
4973 2000-10-25 Chris Demetriou <cgd@sibyte.com>
4975 * ieee.c (ieee_archive_p): Plug one of many possible
4976 memory leaks in error handling.
4978 2000-10-20 Jakub Jelinek <jakub@redhat.com>
4980 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
4981 elf32_sparc_object_p, elf32_sparc_final_write_processing):
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.
4987 * cpu-sparc.c: Ditto.
4989 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
4991 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
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.
5004 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
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.
5009 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5011 From Ralf Baechle <ralf@gnu.org>
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.
5018 2000-10-12 Alan Modra <alan@linuxcare.com.au>
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.
5025 * bfd-in2.h: Regenerate.
5027 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5029 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5030 fudge values for discarded link-once section symbols.
5032 * elf64-hppa.c: Include alloca-conf.h
5034 2000-10-11 Alan Modra <alan@linuxcare.com.au>
5036 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5038 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5040 2000-10-10 Alan Modra <alan@linuxcare.com.au>
5042 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5044 2000-10-10 Tom Rix <trix@redhat.com>
5046 * section.c (bfd_make_section_anyway): Release newsect ptr when
5047 newsect->symbol fails to alloc. Use bfd_release instead of free.
5049 2000-10-09 Richard Henderson <rth@cygnus.com
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.
5055 2000-10-07 Alan Modra <alan@linuxcare.com.au>
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.
5064 * elf.c (swap_out_syms): Handle global section symbols.
5066 2000-10-05 DJ Delorie <dj@redhat.com>
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
5073 2000-10-05 Jim Wilson <wilson@cygnus.com>
5075 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
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
5081 (elf64_ia64_section_flags): New function containing flag conversion
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.
5087 2000-10-02 Alan Modra <alan@linuxcare.com.au>
5089 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5090 _bfd_elf32_gc_record_vtable. Correct a comment.
5092 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5094 From Ralf Baechle <ralf@gnu.org>
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
5101 2000-09-30 Petr Sorfa <petrs@sco.com>
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.
5108 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
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.
5131 2000-09-29 Momchil Velikov <velco@fadata.bg>
5133 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5134 R_ARM_THM_PC22 relocations.
5136 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5138 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5140 2000-09-29 Momchil Velikov <velco@fadata.bg>
5142 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5143 is has the SEC_HAS_CONTENTS flag set.
5145 2000-09-28
\81Örjan Friberg <orjanf@axis.com>
5146 Hans-Peter Nilsson <hp@axis.com>
5148 * aout-cris.c (N_TXTADDR): Define.
5150 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
5152 * som.c: Include alloca-conf.h.
5153 * Makefile.am: "make dep-am"
5154 * Makefile.in: Regenerate.
5156 2000-09-27 Alan Modra <alan@linuxcare.com.au>
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.
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.
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.
5193 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
5195 * elfcode.h (elf_object_p): Preserve and clear abfd section
5196 information. Restore at error.
5198 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
5200 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
5201 is empty, make sure that its rva also 0. NT loader dislikes
5204 2000-09-26 Steve Ellcey <sje@cup.hp.com>
5206 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
5209 2000-09-21 Alan Modra <alan@linuxcare.com.au>
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.
5217 2000-09-20 Alan Modra <alan@linuxcare.com.au>
5219 * section.c (bfd_get_unique_section_name): Return NULL if
5222 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
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
5229 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
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.
5235 2000-09-18 Alan Modra <alan@linuxcare.com.au>
5237 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
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
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
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.
5259 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
5261 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
5264 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
5266 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
5267 ld/emulparams/shelf.sh.
5269 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
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.
5275 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
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)
5282 2000-09-15 Alan Modra <alan@linuxcare.com.au>
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.
5289 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
5291 * elf32-hppa.c (clobber_millicode_symbols): New function.
5292 (elf32_hppa_size_dynamic_sections): Call it.
5294 2000-09-14 Alan Modra <alan@linuxcare.com.au>
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.
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.
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.
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
5349 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
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.
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
5370 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
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
5377 (sh_elf_info_to_howto): Make sure the new gap isn't used.
5378 (sh_elf_relocate_section): Likewise.
5380 2000-09-13 Anders Norlander <anorland@acc.umu.se>
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.
5388 2000-09-13 Marco Franzen <marcof@thyron.com>
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.
5394 2000-09-12 Jason Eckhardt <jle@cygnus.com>
5396 * elf32-i860.c (elf32_i860_relocate_pc26): New function
5398 (elf32_i860_relocate_section): Invoke new function from here.
5400 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5402 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
5405 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
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
5411 2000-09-09 Kazu Hirata <kazu@hxi.com>
5413 * riscix.c: Remove DEFUN.
5415 2000-09-08 Nick Clifton <nickc@redhat.com>
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.
5421 2000-09-08 Kazu Hirata <kazu@hxi.com>
5423 * archive.c: Fix formatting.
5424 * coff-arm.c: Likewise.
5425 * doc/chew.c: Likewise.
5427 2000-09-08 Alan Modra <alan@linuxcare.com.au>
5429 * section.c (bfd_get_unique_section_name): Put a dot before the
5432 2000-09-07 Kazu Hirata <kazu@hxi.com>
5434 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
5435 * elf.c: Fix formatting.
5437 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
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.
5447 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
5449 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
5450 pseduo-section when determining where the TOC ends.
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.
5455 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
5456 reloc is 26 or 32 bits wide.
5458 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
5459 for relocs that don't change anything. Also look at the full
5462 2000-09-06 Philip Blundell <philb@gnu.org>
5464 * config.bfd (arm*-*-uclinux*): New target.
5466 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
5468 * configure: Rebuilt with new libtool.m4.
5470 2000-09-06 Alan Modra <alan@linuxcare.com.au>
5472 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
5473 word for variable name.
5474 * bfd-in2.h: Regenerate.
5476 2000-09-05 Nick Clifton <nickc@redhat.com>
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
5484 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
5486 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
5488 2000-09-05 Alan Modra <alan@linuxcare.com.au>
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
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
5507 (hppa_link_hash_newfunc): New function.
5508 (elf32_hppa_link_hash_table_create): Use above function. Init new
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
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
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.
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.
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.
5582 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
5583 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
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
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.
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.
5606 2000-09-03 Philip Blundell <philb@gnu.org>
5608 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
5609 references to undefined symbols in debugging sections.
5611 2000-09-02 H.J. Lu <hjl@gnu.org>
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
5618 2000-09-02 Jason Eckhardt <jle@cygnus.com>
5620 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
5621 (elf32_i860_is_local_label_name): New function and prototype.
5623 2000-09-02 Nick Clifton <nickc@redhat.com>
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.
5631 2000-09-02 Daniel Berlin <dberlin@redhat.com>
5633 * elf.c (_bfd_elf_make_section_from_shdr): Add
5634 .gnu.linkobce.wi. to the list of debug section names.
5636 2000-09-02 Nick Clifton <nickc@redhat.com>
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.
5643 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
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
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):
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
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):
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):
5681 * bfd-in2.h, libbfd.h: Rebuilt.
5683 2000-09-01 Alan Modra <alan@linuxcare.com.au>
5685 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
5688 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
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.
5693 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
5695 * acinclude.m4: Include libtool and gettext macros from the
5697 * aclocal.m4, configure: Rebuilt.
5699 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
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.
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.
5711 2000-08-27 Alan Modra <alan@linuxcare.com.au>
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.
5723 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
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.
5729 2000-08-22 Doug Kwan <dkwan@transmeta.com>
5731 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
5732 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
5734 2000-08-22 H.J. Lu <hjl@gnu.org>
5736 * elf-bfd.h (elf_link_hash_table): Add runpath.
5738 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
5739 * bfd-in2.h: Rebuilt.
5741 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
5742 "runpath" field to NULL.
5743 (bfd_elf_get_runpath_list): New function.
5745 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
5748 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
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.
5754 2000-08-21 H.J. Lu <hjl@gnu.org>
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.
5763 2000-08-21 Jason Eckhardt <jle@cygnus.com>
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.
5771 2000-08-16 Jason Eckhardt <jle@cygnus.com>
5773 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
5774 was previously just a stub).
5776 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
5778 * elflink.c (_bfd_elf_create_got_section): Don't abort().
5780 (_bfd_elf_create_dynamic_sections): Likewise.
5782 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
5784 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
5785 for undefined symbols to be the beginning of the section.
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.
5792 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
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.
5798 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
5801 2000-08-14 Jim Wilson <wilson@cygnus.com>
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
5808 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
5810 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
5812 2000-08-10 Jason Eckhardt <jle@cygnus.com>
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.
5823 2000-08-10 Nick Clifton <nickc@cygnus.com>
5825 * elf32-arm.h: Fix formatting.
5827 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
5829 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
5831 2000-08-08 Jason Eckhardt <jle@cygnus.com>
5833 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
5835 2000-08-07 Kazu Hirata <kazu@hxi.com>
5837 * ieee.c (ieee_write_debug_part): Rewrite a comment.
5838 * elf64-ia64.c: Fix a typo.
5840 2000-08-05 Jason Eckhardt <jle@cygnus.com>
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.
5851 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
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.
5866 2000-08-03 Nick Clifton <nickc@cygnus.com>
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.
5874 2000-08-03 H.J. Lu <hjl@gnu.org>
5876 * section.c: Back out the change made by Nick Clifton
5877 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
5879 * bfd-in2.h: Likewise.
5882 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
5884 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
5886 2000-07-31 Jason Eckhardt <jle@cygnus.com>
5888 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
5889 * bfd-in2.h, libbfd.h: Regenerate.
5891 2000-07-31 Nick Clifton <nickc@cygnus.com>
5893 * section.c (struct sec): Add new boolean field 'segment_mark'.
5894 (STD_SECTION): Initialise new field to zero.
5896 * bfd-in2.h: Regenerate.
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
5913 2000-07-22 Jason Eckhardt <jle@cygnus.com>
5915 * cpu-i860.c: Added comments.
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.
5922 * targets.c (bfd_elf32_i860_little_vec): Declaration of
5924 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
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"
5933 * configure.in (bfd_elf32_i860_little_vec): Added recognition
5936 * configure: Regenerated.
5938 2000-07-27 H.J. Lu <hjl@gnu.org>
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
5944 (elf_link_add_object_symbols): Pass dt_needed to
5945 elf_merge_symbol ().
5947 2000-07-27 Nick Clifton <nickc@cygnus.com>
5949 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
5952 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
5954 * configure.host (*-*-aix*): AIX has 'long long' always.
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.
5961 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
5963 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
5964 of dynobj for SGI_COMPAT checks.
5966 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
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.
5972 2000-07-21 Nick Clifton <nickc@cygnus.com>
5974 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
5975 range symbol indices in relocs and issue an error message.
5977 2000-07-20 H.J. Lu <hjl@gnu.org>
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.
5983 2000-07-20 H.J. Lu <hjl@gnu.org>
5985 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
5986 only if info->new_dtags is true.
5988 2000-07-20 H.J. Lu <hjl@gnu.org>
5990 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
5991 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
5993 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
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.
6019 2000-07-19 H.J. Lu <hjl@gnu.org>
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.
6034 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6035 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6037 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6039 2000-07-19 H.J. Lu <hjl@gnu.org>
6041 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6042 * bfd-in2.h: Rebuild.
6044 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6045 (elf_dt_soname): New.
6047 * elf.c (bfd_elf_set_dt_needed_soname): New.
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.
6053 2000-07-19 H.J. Lu <hjl@gnu.org>
6055 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6056 DT_DEPAUDIT and DT_AUDIT as strings.
6058 2000-07-19 Nick Clifton <nickc@cygnus.com>
6060 * format.c: Fix formatting.
6062 2000-07-19 H.J. Lu <hjl@gnu.org>
6064 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
6066 2000-07-19 H.J. Lu <hjl@gnu.org>
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.
6076 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
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.
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.
6087 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
6089 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
6090 parenthesis in if statement.
6092 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
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
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.
6122 2000-07-15 H.J. Lu <hjl@gnu.org>
6124 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
6126 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
6128 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
6129 out a structure that is BFD_IN_MEMORY.
6131 2000-07-11 Alan Modra <alan@linuxcare.com.au>
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.
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.
6144 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
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.
6151 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
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):
6158 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
6159 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
6161 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
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.
6168 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
6170 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
6171 compatibility with older binutils.
6173 2000-07-10 Alan Modra <alan@linuxcare.com.au>
6175 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
6176 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
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.
6184 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
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
6191 2000-07-09 Alan Modra <alan@linuxcare.com.au>
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.
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.
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.
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.
6222 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
6223 for .init* and .fini*.
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.
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.
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
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.
6266 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
6268 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
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.
6275 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
6278 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
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.
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.
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.
6302 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
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.
6308 * libhppa.h: Change practically all unsigned ints to plain ints.
6309 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
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
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.
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.
6326 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
6327 available with BL, not BE and BLE.
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.
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.
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,
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
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.
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).
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.
6371 2000-07-08 Alan Modra <alan@linuxcare.com.au>
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.
6385 2000-07-07 DJ Delorie <dj@redhat.com>
6387 * archive.c (_bfd_write_archive_contents): Add an informative
6390 2000-07-06 Kazu Hirata <kazu@hxi.com>
6392 * srec.c: Fix formatting.
6394 2000-06-05 DJ Delorie <dj@redhat.com>
6398 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
6400 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
6401 value of PC-relative offsets.
6403 2000-07-03 Jim Wilson <wilson@cygnus.com>
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.
6409 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
6411 * elf32-mips.c: Include elf32-target.h again for the traditional
6414 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
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.
6423 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
6425 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
6426 an external symbol for a non-shared, non-relocatable link.
6428 2000-07-03 Nick Clifton <nickc@redhat.com>
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
6435 2000-07-03 Kazu Hirata <kazu@hxi.com>
6437 * reloc16.c: Fix formatting.
6439 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
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
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.
6453 2000-07-01 Alan Modra <alan@linuxcare.com.au>
6455 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
6456 (CLEANFILES): Add DEPA.
6457 * Makefile.in: Regenerate.
6459 2000-06-30 DJ Delorie <dj@cygnus.com>
6461 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
6462 can't assume the PE header is at 0x80.
6464 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
6466 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
6468 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
6470 * go32stub.h: Update stub.
6472 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
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.
6484 2000-06-26 Kazu Hirata <kazu@hxi.com>
6486 * coff-h8300.c: Fix formatting.
6487 * cpu-h8300.c: Likewise.
6489 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
6491 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
6492 for local symbols whose names are unknown.
6494 2000-06-22 Alan Modra <alan@linuxcare.com.au>
6496 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
6498 * Makefile.in: Regenerate.
6499 * doc/Makefile.in: Regenerate.
6501 2000-06-20 H.J. Lu <hjl@gnu.org>
6503 * Makefile.am: Rebuild dependency.
6504 * Makefile.in: Rebuild.
6506 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6508 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
6509 (elf_backend_copy_indirect_symbol): Map to the new function.
6511 2000-06-20 Alan Modra <alan@linuxcare.com.au>
6513 * archive.c (normalize): Correct pointer comparison when checking
6515 (bfd_bsd_truncate_arname): Likewise.
6516 (bfd_gnu_truncate_arname): Likewise.
6518 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
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
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
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.
6548 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6550 * elf32-mips.c: Fix typos in comments.
6552 2000-06-19 Mark Kettenis <kettenis@gnu.org>
6554 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
6557 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
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
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.
6577 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
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.
6587 2000-06-18 H.J. Lu <hjl@gnu.org>
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.
6594 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
6596 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
6597 GOT entries if we're doing a static link or -Bsymbolic link.
6599 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
6601 * elflink.h (elf_link_adjust_relocs): Check for and call backend
6602 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
6604 (elf_link_output_relocs): Likewise.
6605 (elf_reloc_link_order): Likewise.
6607 2000-06-16 Nicholas Duffek <nsd@redhat.com>
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
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,
6622 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
6624 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
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.
6630 2000-06-16 Nicholas Duffek <nsd@redhat.com>
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):
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.
6651 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6653 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
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.
6662 2000-06-14 H.J. Lu <hjl@gnu.org>
6664 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
6667 2000-06-13 H.J. Lu <hjl@gnu.org>
6669 * configure: Regenerate.
6671 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
6673 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
6676 2000-06-08 David O'Brien <obrien@FreeBSD.org>
6678 * configure.in (VERSION): Update to show this is the CVS mainline.
6680 2000-06-07 Alan Modra <alan@linuxcare.com.au>
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.
6687 * Makefile.am: Run "make dep-am" to regenerate dependencies.
6688 * Makefile.in: Regenerate.
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.
6700 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
6702 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
6704 2000-06-05 H.J. Lu <hjl@gnu.org>
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 ().
6710 2000-06-05 H.J. Lu <hjl@gnu.org>
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.
6717 2000-06-01 J.T. Conklin <jtc@redback.com>
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.
6724 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
6726 * trad-core.c: From hpux-core.c, include <dirent.h> or
6727 <sys/ndir.h> when possible.
6729 2000-05-31 Ulrich Drepper <drepper@redhat.com>
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.
6735 2000-05-31 Alan Modra <alan@linuxcare.com.au>
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.
6741 2000-05-30 Nick Clifton <nickc@cygnus.com>
6743 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
6744 80960CA, 80960MC as valid machine names.
6746 2000-05-30 H.J. Lu <hjl@gnu.org>
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.
6752 * elflink.h (elf_link_add_object_symbols): Always turn the
6753 symbol into local if it has the hidden or internal attribute.
6755 2000-05-29 Philip Blundell <philb@gnu.org>
6757 * ppcboot.c: Add packed attribute if compiling with GCC.
6759 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
6761 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
6763 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
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
6770 2000-05-26 Alan Modra <alan@linuxcare.com.au>
6772 * Makefile.am: Update dependencies with "make dep-am"
6773 * Makefile.in: Regenerate.
6775 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
6776 bindtextdomain): Replace defines with those from intl/libgettext.h
6777 to quieten gcc warnings.
6779 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
6781 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
6783 * archive.c (normalize, bfd_bsd_truncate_arname,
6784 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
6785 file names with backslashes.
6787 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
6790 * sysdep.h: Include filenames.h.
6792 2000-05-26 Alan Modra <alan@linuxcare.com.au>
6794 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
6796 2000-05-26 Jakub Jelinek <jakub@redhat.com>
6798 * elf64-sparc.c (sparc64_elf_relax_section): New.
6799 (sparc64_elf_relocate_section): Optimize tail call into branch always
6801 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6802 (elf32_sparc_relax_section): New.
6804 2000-05-26 Jakub Jelinek <jakub@redhat.com>
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.
6813 2000-05-23 H.J. Lu <hjl@gnu.org>
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.
6819 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
6821 2000-05-23 H.J. Lu <hjl@gnu.org>
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.
6837 2000-05-22 Richard Henderson <rth@cygnus.com>
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.
6852 2000-05-22 Nick Clifton <nickc@cygnus.com>
6854 * configure.in : Add peigen.lo to MIPS PE targets.
6855 * configure: Regenerate.
6857 2000-05-22 Momchil Velikov <velco@fadata.bg>
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
6865 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
6866 endianess checks, call _bfd_generic_verify_endian_match() instead.
6868 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
6870 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
6872 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
6873 endianess before checking bfd flavours.
6875 2000-05-22 H.J. Lu <hjl@gnu.org>
6877 * elflink.h (elf_link_output_extsym): Clear the visibility
6878 field for symbols not defined locally.
6880 2000-05-18 Alan Modra <alan@linuxcare.com.au>
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.
6887 2000-05-18 Momchil Velikov <velco@fadata.bg>
6889 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
6890 relocs for an executable, ensure that they are virtual addresses.
6892 2000-05-18 Jeffrey A Law (law@cygnus.com)
6894 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
6896 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
6897 Rick Gorton <gorton@scrugs.lkg.dec.com>
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.
6906 2000-05-16 Catherine Moore <clm@cygnus.com>
6908 * som.c (som_decode_symclass): Recognize weak symbols.
6910 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
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.
6916 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
6918 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
6920 2000-05-14 Philip Blundell <philb@gnu.org>
6922 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
6924 2000-05-12 Alan Modra <alan@linuxcare.com.au>
6926 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
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.
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.
6941 2000-05-09 Alan Modra <alan@linuxcare.com.au>
6943 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
6945 (copy_private_bfd_data): Allow for space possibly taken up by elf
6946 headers when calculating segment physical address from lma.
6948 2000-05-08 Alan Modra <alan@linuxcare.com.au>
6950 * versados.c (versados_scan): Init stringlen and pass_2_done.
6952 * trad-core.c (trad_unix_core_file_p): Return
6953 bfd_error_wrong_format rather than bfd_error_file_truncated.
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.
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
6970 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
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.
6979 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
6981 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
6982 Change U802TOC64MAGIC to U803XTOCMAGIC.
6984 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
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.
6990 2000-05-04 Alan Modra <alan@linuxcare.com.au>
6992 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
6994 2000-05-03 Martin v. L
\81öwis <loewis@informatik.hu-berlin.de>
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
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.
7004 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
7006 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7008 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7010 2000-05-02 H.J. Lu <hjl@gnu.org>
7012 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7015 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7017 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7018 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
7020 * Makefile.in: Regenerate.
7022 2000-05-01 Jim Wilson <wilson@cygnus.com>
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.
7030 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7032 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
7033 doesn't work very well.
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.
7065 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
7068 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
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.
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.
7102 * configure.in (TRAD_HEADER): Test non-null before
7104 * configure: Regenerate.
7106 * reloc.c: Fix mis-spelling in comment.
7108 2000-05-01 Alan Modra <alan@linuxcare.com.au>
7110 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
7111 * vms.c (vms_openr_next_archived_file): Return NULL.
7113 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7115 * coffcode.h Copy changes mistakenly done to libcoff.h in
7118 2000-04-29 Andreas Jaeger <aj@suse.de>
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.
7126 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
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
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,
7139 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
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.
7146 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
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.
7152 2000-04-27 Alan Modra <alan@linuxcare.com.au>
7154 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
7155 Check local_got_refcounts before dereferencing.
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
7162 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
7164 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
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.
7173 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
7175 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
7177 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
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
7190 (MINUS_ONE): New macro.
7191 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
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
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
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
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.
7237 2000-04-24 Jeffrey A Law (law@cygnus.com)
7239 * config.bfd: Only disable elf32-hppa vectors, not all of the
7240 BSD and OSF configuration support. Provide (disabled) clauses
7242 * configure.in: Add clause for PA64 support.
7243 * configure: Rebuilt.
7245 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
7246 (bfd_elf64_hppa_vec): Declare.
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.
7253 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
7255 2000-04-24 Jason Eckhardt <jle@cygnus.com>
7257 * libhppa.h (dis_assemble_16): New function.
7258 (pa_arch): Added pa20w element.
7260 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
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.
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.
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.
7278 2000-04-21 Matthew Green <mrg@cygnus.com>
7280 * config.bfd: Add NetBSD/sparc64 support.
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>
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):
7307 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
7308 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
7310 2000-04-21 Richard Henderson <rth@cygnus.com>
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.
7316 2000-04-20 H.J. Lu <hjl@gnu.org>
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.
7322 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
7325 * dwarf2.c (concat_filename): Avoid string literal concatenation.
7326 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
7328 Mon Apr 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
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
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
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
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.
7380 2000-04-17 Timothy Wall <twall@cygnus.com>
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.
7390 2000-04-13 Alan Modra <alan@linuxcare.com.au>
7392 * elf32-hppa.h: Update copyright date.
7394 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
7395 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
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.
7401 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
7404 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
7406 2000-04-12 Alan Modra <alan@linuxcare.com.au>
7408 * dep-in.sed: Match space before file name, not after.
7409 * Makefile.am: Regenerate dependencies.
7410 * Makefile.in: Regenerate.
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.
7416 2000-04-11 Alan Modra <alan@linuxcare.com.au>
7418 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
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.
7425 2000-04-11 Timothy Wall <twall@cygnus.com>
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.
7433 Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
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.
7440 2000-04-07 Nick Clifton <nickc@cygnus.com>
7442 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
7443 BFD_RELOC_THUMB_PCREL_BLX.
7445 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7446 R_ARM_XPC25 and R_ARM_THM_PC22.
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].
7453 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
7454 elf/arm-oabi.h to elf/arm.h
7456 * Makefile.am: Fix dependency for elfarm-oabi.c
7457 * Makefile.in: Regenerate.
7459 * bfd-in2.h: Regenerate.
7460 * libbfd.h: Regenerate.
7462 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7464 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
7465 and restore it on failure. Release newly allocated tdata on
7468 Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
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.
7474 2000-04-07 Timothy Wall <twall@cygnus.com>
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.
7489 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7491 * elfcore.h (elf_core_file_p): call backend_object_p which
7492 thereby gets an opportunity to update the arch/machine type.
7494 2000-04-06 Timothy Wall <twall@cygnus.com>
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.
7501 2000-04-06 Nick Clifton <nickc@cygnus.com>
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
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.
7513 Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
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
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.
7527 2000-04-04 Alan Modra <alan@linuxcare.com.au>
7529 * po/bfd.pot: Regenerate.
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
7535 (DEP1): Rewrite for "gcc -MM".
7536 (CLEANFILES): Add DEP2.
7537 Update dependencies.
7538 * Makefile.in: Regenerate.
7540 2000-04-03 Kevin Buettner <kevinb@redhat.com>
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.
7547 2000-04-03 H.J. Lu <hjl@gnu.org>
7549 * cache.c (bfd_open_file): Unlink the output file only if
7550 it has non-zero size.
7552 2000-04-01 Ken Block USG <block@zk3.dec.com>
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.
7558 Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
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.
7570 2000-04-03 Kazu Hirata <kazu@hxi.com>
7572 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
7573 the R_PCRWORD_B case.
7575 2000-03-31 Thomas de Lellis <tdel@wrs.com>
7577 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
7581 Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
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.
7591 2000-03-27 Alan Modra <alan@linuxcare.com.au>
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.
7600 2000-03-27 Denis Chertykov <denisc@overta.ru>
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
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.
7617 2000-03-24 H.J. Lu <hjl@gnu.org>
7619 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
7620 (elf64_alpha_find_reloc_at_ofs): Likewise.
7622 2000-03-17 Alan Modra <alan@linuxcare.com.au>
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".
7630 2000-03-14 Doug Evans <dje@casey.transmeta.com>
7632 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
7634 2000-03-14 Kazu Hirata <kazu@hxi.com>
7636 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
7637 of shrinks properly, including the last reloc.
7639 2000-03-13 Kazu Hirata <kazu@hxi.com>
7641 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
7644 2000-03-11 Alan Modra <alan@linuxcare.com.au>
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.
7650 2000-03-10 Geoff Keating <geoffk@cygnus.com>
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.
7656 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
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.
7674 2000-03-10 Alan Modra <alan@linuxcare.com.au>
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.
7683 2000-03-07 Doug Evans <dje@casey.transmeta.com>
7685 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
7686 * bfd-in2.h: Rebuild.
7688 2000-03-06 Nick Clifton <nickc@cygnus.com>
7690 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
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
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.
7706 2000-03-06 Catherine Moore <clm@cygnus.com>
7708 * elf.c (swap_out_syms): Check for null type_ptr.
7710 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
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.
7720 2000-02-29 H.J. Lu <hjl@gnu.org>
7722 * peicode.h (jtab): Make it static.
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.
7729 2000-03-01 Nick Clifton <nickc@cygnus.com>
7731 * coff-arm.c (bfd_arm_process_before_allocation): Make
7732 'symndx' signed to prevent compile time warning.
7734 * coff-mcore.c: Remove unused prototype for pe_object_p.
7736 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
7737 functions that are not used when COFF_IMAGE_WITH_PE is
7739 (struct sh_opcode): Change type of 'flags' field to unsigned
7740 long so that it can hold the USESAS flag.
7742 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
7744 * elf-m10300.c (mn10300_elf_relax_section): Initialise
7747 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
7749 Remove unusued variables and code.
7750 (elf_backend_add_symbol_hook): Fix prototype.
7752 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
7755 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
7758 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
7760 Remove unusued variables and code.
7761 (elf_backend_add_symbol_hook): Fix prototype.
7763 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
7765 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
7766 to unused function parameter.
7768 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
7770 Use EMPTY_HOWTO to initialise empty howto slots.
7771 Remove unused variables.
7773 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
7775 2000-03-01 H.J. Lu <hjl@gnu.org>
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):
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.
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
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.
7823 2000-02-28 Nick Clifton <nickc@cygnus.com>
7825 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
7826 * Makefile.in: Regenerate.
7828 * configure.in: Add support for mips and sh pe vectors.
7829 * configure: regenerate.
7831 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
7834 * targets.c: Add mips and sh pe vectors.
7836 * libpei.h (coff_final_link_postscript): Only define if not
7839 * coffcode.h: Add support for WinCE magic numbers.
7841 * peigen.c (pe_print_reloc): Update comment and rearrange
7842 appending of newline character.
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
7848 (pe_ILF_make_a_reloc): New function. Create a reloc based on
7850 (pe_ILF_make_a_symbol): New function. Create a symbol based
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
7856 (pe_ILF_object_p): New function. Return a bfd_target pointer
7858 (pe_bfd_object_p): If an ILF object is detected call
7859 pe_ILF_object_p on it.
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.
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.
7869 * pe-mips.c: New file. Support code for mips-pe target.
7870 * pei-mips.c: New file. Support code for mips-pe target.
7872 2000-02-27 Jakub Jelinek <jakub@redhat.com>
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.
7880 2000-02-27 Ian Lance Taylor <ian@zembu.com>
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.
7887 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
7889 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
7890 name of the libtool directory.
7891 * Makefile.in: Rebuild.
7893 Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
7895 * som.c (SOM_HOWTO): Define.
7896 (som_hppa_howto_table): Use it.
7898 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
7900 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
7902 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
7904 2000-02-24 Catherine Moore <clm@cygnus.com>
7906 * som.c (som_misc_symbol_info): Add field
7908 (som_bfd_derive_misc_symbol_info): Initialize
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
7917 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
7919 * dwarf2.c (read_address): Read 16-bits addresses.
7920 (parse_comp_unit): Accept addr_size == 2.
7922 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
7924 * bfd-in.h: Update copyright date.
7926 2000-02-23 Linas Vepstas <linas@linas.org>
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.
7941 * Makefile.in: Regenerate.
7942 * configure: Regenerate.
7943 * bfd-in2.h: Regenerate.
7945 2000-02-22 Ian Lance Taylor <ian@zembu.com>
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.
7950 2000-02-22 H.J. Lu <hjl@gnu.org>
7952 * elflink.h (elf_link_add_object_symbols): If a version symbol is
7953 not defined, don't add a second ELF_VER_CHR.
7955 * elflink.h (elf_bfd_final_link): Call output_extsym for global
7956 symbols converted to local symbols even when stripping all
7958 (elf_link_output_extsym): Process global symbols converted to
7959 local symbols even if they are being stripped.
7961 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
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
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.
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.
7978 2000-02-21 Ian Lance Taylor <ian@zembu.com>
7980 ELF HPPA doesn't work at present; remove it until it does.
7981 * config.bfd: Comment out setting targ_defvec to
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.
7990 2000-02-18 Geoff Keating <geoffk@cygnus.com>
7992 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
7993 is no bfd_free(). Revert bfd_free part of previous change.
7995 2000-02-18 Geoff Keating <geoffk@cygnus.com>
7997 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
7999 (coff_compute_section_file_positions): Use bfd_free to pair
8001 (coff_write_object_contents): Likewise.
8003 * coff-rs6000.c (xcoff_howto_table_16): New variable.
8004 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8006 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
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
8030 2000-02-18 Richard Henderson <rth@cygnus.com>
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.
8050 2000-02-17 Kevin Buettner <kevinb@redhat.com>
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.
8061 Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
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.
8096 2000-02-13 Richard Henderson <rth@cygnus.com>
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.
8110 2000-02-13 Ian Lance Taylor <ian@zembu.com>
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
8116 * bfd-in2.h: Rebuild.
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
8121 * bfd-in2.h: Rebuild.
8123 2000-02-10 Timothy Wall <twall@cygnus.com>
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.
8132 Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
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.
8144 2000-02-09 Timothy Wall <twall@cygnus.com>
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
8150 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
8152 * coff-go32.c: Update comment. Update copyright.
8154 2000-01-27 Thomas de Lellis <tdel@windriver.com>
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:
8162 'w' = weak unresolved
8163 'V' = weak global object
8164 'v' = weak unresolved object
8166 (bfd_is_undefined_symclass): New function. Return true if the
8167 given symbol class represents and undefined/unresolved symbol.
8169 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
8172 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
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
8179 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
8181 * coff-i386.c (i3coff_object_p): Remove prototype.
8184 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
8185 to name. Update copyright.
8187 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
8188 assignment to avoid warning. Update copyright.
8190 2000-01-24 Robert Lipe (robertl@sco.com)
8192 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
8193 instead of using GNU C extension.
8195 2000-01-21 Nick Clifton <nickc@cygnus.com>
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
8202 2000-01-14 Nick Clifton <nickc@cygnus.com>
8204 * linker.c (default_indirect_link_order): oops - fix incorrectly
8205 applied patch from Tim Wall.
8207 2000-01-13 Timothy Wall (twall@tiac.net>
8209 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
8210 = scnhsz, filhsz, relsz, aoutsz, etc)
8212 * coffswap.h: Ditto.
8214 2000-01-13 Nick Clifton <nickc@cygnus.com>
8216 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
8217 interwork thumb to arm stub.
8219 2000-01-13 Timothy Wall (twall@tiac.net>
8221 * archures.c (bfd_octets_per_byte): New function: Return
8223 (bfd_arch_mach_octets_per_byte): New function: Return target
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.
8230 * bfd-in2.h: Regenerate.
8232 * coffgen.c: Indicate that the offset parameter is in bytes, not
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.
8240 * linker.c (bfd_generic_reloc_link_order): Ditto.
8241 (_bfd_default_link_order): Ditto.
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.
8248 * srec.c (srec_write_section): Ditto.
8250 2000-01-13 Nick Clifton <nickc@cygnus.com>
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.
8256 2000-01-10 Philip Blundell <pb@futuretv.com>
8258 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
8259 (arm*-*-conix*): New target.
8261 2000-01-10 Egor Duda <deo@logos-m.ru>
8263 * config.bfd: Include elf32_i386 vector to target list for cygwin
8266 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
8267 * configure.in: Test for structure win32_pstatus_t in
8269 * configure: Regenerate.
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.
8275 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8277 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
8279 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
8280 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
8282 For older changes see ChangeLog-9899
8288 version-control: never