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