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