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