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