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